Unable to locate package XXX问题解决

本文详细介绍了在干净的Ubuntu18.04镜像上安装VNC过程中遇到的问题及解决方案,包括解决nameserver配置、source.list修改以及apt-get命令使用等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值