Falha ao baixar libncurses5

Falha ao baixar libncurses5

Não consigo instalar a biblioteca ncurses no meu computador. Quando compilo com make , recebo um erro fatal n.curses.h: No such file or directory.

Tentei instalar via terminal, mas não consegui. Eu tenho esta resposta: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

Também tentei consertar meu source.list desde que usei: sudo tee /etc/apt/sources.list

No entanto, ele excluiu tudo do arquivo. Pesquisando na web encontrei isso:

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

(...)

Copiei e colei no meu source.list e coloquei ' #' onde diz debor deb-src. Agora não consigo baixar nenhum software via terminal, você pode me ajudar?


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

Responder1

Então você está executando o Ubuntu 20.04 LTS de 64 bits. Você pode restaurar repositórios APT padrão usando o seguinte comando longo:

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

adicione arquitetura i386 de 32 bits, atualize listas de pacotes usando e instale os pacotes necessários

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

informação relacionada