我不能在我的电脑上安装ncurses库。当我用make编译它时,我会得到一个致命的错误n.curses.h:没有这样的文件或目录。
我试图通过终端安装它,但是我没有成功。我得到了这样的回应: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我还试图修复我的source.list,因为我使用了:sudo tee /etc/apt/sources.list
但是,它删除了文件中的所有内容。我在网上找到了以下内容:
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(...)
复制并粘贴在我的source.list上,并在上面写着deb或deb-src的地方放置“#”。现在,我不能通过终端下载任何软件,你能帮我吗?
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发布于 2021-10-02 16:37:46
因此,您正在运行64位Ubuntu20.04LTS。可以使用以下单个long命令恢复默认APT存储库:
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添加32位i386体系结构,使用并安装所需的包更新包列表。
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5 libncurses5:i386https://askubuntu.com/questions/1367038
复制相似问题