Unable to locate package XXX问题解决
真的很小白:
一个干净18.04ubuntu 镜像上来,我想装个vnc,结果就各种问题
1.servernamespace 的问题 找不到 host和对应地址 是host还是地址映射
echo “nameserver 202.96.134.133 nameserver 8.8.8.8” | sudo tee /etc/resolv.conf > /dev/null
就是需要改下/etc/resolv.conf 文件 增加nameserver
2.可以识别 host还是不能locate package
需要修改/etc/apt/source.list,看下sourlist的文章可以知道,主要是 云服务器下载的源文件路径,当然是越多越好
参考下大家
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
3.上述都可以了
apt-get update
然后再 apt-get install vnc4server