我已经全新安装了Ubuntu Server 13.10,并且正在尝试安装FTP服务器,但是apt-get似乎不想安装任何东西。
sudo apt-get install vsftpd
带来错误:unable to locate package vsftpd
。
所以我再次尝试了,但是安装了“ cowsay”程序。同样的事情发生了。
我试过了apt-get update
。
我试过了sudo apt-cache search vsftpd
,什么也没回来。但是,如果我在普通的Ubuntu计算机(而不是服务器)上键入相同的命令,则会弹出结果。
那怎么了
您的sources.list文件中有两个重复的软件源,并且它可能还存在其他问题。
您可以从头开始重新生成整个sources.list文件,并将旧的sources.list文件重命名为备份。访问repogen Ubuntu Sources List Generator网站,您可以在那里重新生成您的sources.list文件。
Ubuntu 16.04的标准sources.list文件如下所示:
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
Ubuntu 18.04的标准sources.list文件如下所示:
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner
完成此操作后,通过在终端中运行以下命令,告诉您的系统从其知道的每个存档中提取最新的软件列表:
sudo apt-get update
repogen网站上有一个下拉菜单,可让您从当前所有受支持的Ubuntu版本中进行选择。按照此答案中的说明,也可以手动重新生成默认的sources.list文件,而无需访问repogen网站。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句