Failed to Download Libncurses5

Failed to Download Libncurses5

I can't install ncurses library on my computer. When I compile it with make , I get a fatal error n.curses.h: No such file or directory.

I tried to install it via terminal, however I didn't succeed. I've got this response: sudo apt-get install libncurses5 libncurses5:i386

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libncurses5
E: Unable to locate package libncurses5:i386

I also tried to fix my source.list since I used: sudo tee /etc/apt/sources.list

However, it deleted everything on the file. Searching on web I found this:

deb  focal main restricted universe multiverse
deb-src  focal main restricted universe multiverse

deb  focal-updates main restricted universe multiverse
deb-src  focal-updates main restricted universe multiverse

deb  focal-security main restricted universe multiverse
deb-src  focal-security main restricted universe multiverse

deb  focal-backports main restricted universe multiverse
deb-src  focal-backports main restricted universe multiverse

(...)

Copied and pasted on my source.list and placed '#' where it says deb or deb-src. Now, I can't download any software via terminal, can you help me?


uname -a; arch

Linux muca 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
x86_64
2

1 Answer

So you are running 64-bit Ubuntu 20.04 LTS. You can restore default APT repositories using the following single long command:

cat <<EOF | sudo tee /etc/apt/sources.list
deb  focal main universe multiverse restricted
deb  focal-security main universe multiverse restricted
deb  focal-updates main universe multiverse restricted
deb  focal-backports main universe multiverse restricted

deb-src  focal main universe multiverse restricted
deb-src  focal-security main universe multiverse restricted
deb-src  focal-updates main universe multiverse restricted
deb-src  focal-backports main universe multiverse restricted
EOF

add 32-bit i386 architecture, update package lists using and install needed packages

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5 libncurses5:i386
6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.