apt 似乎不起作用

apt 似乎不起作用

我已经看到类似的错误,但似乎没有任何修复对我有用(我尝试删除所有 .disable 文件,但得到的响应是“没有这样的文件”)

我正在使用安装在供应商提供的服务器上的 Ubuntu 14.04,我有管理员权限。每次我尝试使用apt-get installapt-get upgrade等时,我都会得到此输出或类似输出,似乎没有任何变化或安装:

admin@:$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  authbind clusterssh gdebi-core genders ion-igv ion-jk libapache2-mod-jk
  libarchive13 libclass-data-inheritable-perl libcommons-collections3-java
  libcommons-dbcp-java libcommons-pool-java libdevel-stacktrace-perl
  libecj-java libelfg0 libexception-class-perl libgenders0
  libgeronimo-jta-1.1-spec-java libglib2.0-bin libhdb9-heimdal libkdc2-heimdal
  libnettle4 libntdb1 libpackagekit-glib2-16 libservlet3.0-java
  libtomcat7-java libtry-tiny-perl libx11-protocol-perl lsscsi packagekit
  packagekit-backend-aptcc packagekit-tools pdsh python-beautifulsoup
  python-calabash python-jsonpipe python-ntdb python3-chardet python3-debian
  python3-packagekit python3-pkg-resources python3-six tomcat7 tomcat7-admin
  tomcat7-common zeroinstall-injector
Use 'apt-get autoremove' to remove them.
The following packages have been kept back:
  isc-dhcp-client isc-dhcp-common libgl1-mesa-glx libglapi-mesa
  linux-headers-generic
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
N: Ignoring file 'iontorrent-ubuntu.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ionreporter-plugin.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'usb.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent-offcycle.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent-ubuntu.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ionreporter-plugin.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'usb.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent-offcycle.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

我不确定如何或需要更改什么才能使标准 Ubuntu 14.04 apt 包正常运行。

我对 UNIX 故障排除领域还不太熟悉,所以任何帮助都非常感谢!如果您需要任何其他信息,请告诉我。

编辑 1:根据@Jos 的建议,我调用了sudo apt update类似的结果:

 Ign file: updates/ InRelease
Ign file: updates/ Release.gpg
Ign file: updates/ Release
Ign file: updates/ Translation-en_US
Ign file: updates/ Translation-en
Reading package lists... Done
N: Ignoring file 'iontorrent-ubuntu.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ionreporter-plugin.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'usb.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent-offcycle.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iontorrent.list.USBinstaller' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

我认为这是因为供应商已将机器设置为忽略原始 apt 管理器配置,而倾向于通过他们自己托管的软件包文件获取更新?我不确定如何诊断或修复此问题。

答案1

事实上,这里没有什么问题。

首先,运行sudo apt update以使您的软件包数据库与在线存储库保持同步。

您安装了许多未使用的软件包。它们只是占用空间。使用 删除它们sudo apt autoremove

您有几个更新需要注意。这些更新将被“保留”,直到您确定要安装它们为止。(这样做通常是安全的。)使用 安装这些更新sudo apt dist-upgrade

*.USBinstaller删除目录中调用的文件/etc/apt/sources.list.d。使用sudo命令行执行此操作。我不知道这些文件来自哪里,但我很确定您现在不需要它们。不过,这些文件不会导致 apt 进程失败;正如它所说,它们只是被忽略了。

相关内容