解决下载“sudo apt install nfs-kernel-server ”时出现“E: Unable to correct problems, you have held broken packages.”
如图:
解决办法:
提示:通过百度问题,看了多篇博客后,应该是镜像源的问题
具体步骤:
1、先查看自己的Ubuntu版本
cat /proc/version
其中:
可以看到我的版本是:20.04.1
2、去阿里云下载自己版本的镜像源
点击:阿里云镜像源
例如我的就是:
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
3、进入 /etc/apt/sources.list进行修改
sudo gedit /etc/apt/sources.list
4、修改好后,使用“sudo apt-get update”就可以了
sudo apt-get update
5、 就可以继续“sudo apt-get install libncurses5-dev”
sudo apt-get install libncurses5-dev