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 http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ 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

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 http://archive.ubuntu.com/ubuntu/ focal main universe multiverse restricted
deb http://security.ubuntu.com/ubuntu/ focal-security main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu/ focal-updates main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu/ focal-backports main universe multiverse restricted

deb-src http://archive.ubuntu.com/ubuntu/ focal main universe multiverse restricted
deb-src http://security.ubuntu.com/ubuntu/ focal-security main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu/ 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