源更新

用新源代替旧源,以前的源要全部删除,因为已经无效

1、备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

2、修改更新源
sudo gedit /etc/apt/sources.list

3、启用新的更新源
sudo apt-get update
如果出错,检查下网络是否连通再执行
sudo apt-get update --fix-missing


安装ssh-server
sudo apt-get install openssh-server
启动服务:
sudo /etc/init.d/ssh start


一次安装过程中,输入 sudo apt-get update,不能更新,并且弹出
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

上网查询,知道有一个apt的进程正在运行,导致lock,就是没有更新源之前使用apt-get时进度条一直在 0%处,所以 ctrl+c强行终止,导致进程没有结束。查看进程,
wuwei@ubuntu:/etc/apt$ ps -e | grep apt
2396 ? 00:00:00 apt
2577 ? 00:00:02 aptd

wuwei@ubuntu:/etc/apt$ sudo kill 2396
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值