每当我去更新和/或升级时,apt-get
都会返回以下错误:
Failed to download repository information
E:The method driver /usr/lib/apt/methods/gpgv could not be found.
Running: 12.04 (precise) 32bit, kernel 3.5.0-18-generic, gnome 3.4.2
on an amd athlon 7850 dual core with 4GB RAM.
输出ls -l
:
root@nerve:/# ls -l /usr/lib/apt/methods/
total 368
-rwxr-xr-x 1 root root 18112 Oct 30 2014 bzip2
-rwxr-xr-x 1 root root 30452 Oct 30 2014 cdrom
-rwxr-xr-x 1 root root 18044 Oct 30 2014 copy
-rwxr-xr-x 1 root root 55316 Oct 30 2014 ftp
-rwxr-xr-x 1 root root 18052 Oct 30 2014 gzip
-rwxr-xr-x 1 root root 67632 Oct 30 2014 http
-rwxr-xr-x 1 root root 34604 Oct 30 2014 https
lrwxrwxrwx 1 root root 5 Oct 30 2014 lzma -> bzip2
-rwxr-xr-x 1 root root 88256 Oct 30 2014 mirror
-rwxr-xr-x 1 root root 26376 Oct 30 2014 rsh
lrwxrwxrwx 1 root root 3 Oct 30 2014 ssh -> rsh
lrwxrwxrwx 1 root root 5 Oct 30 2014 xz -> bzip2
输出locate gpgv
:
root@nerve:/# locate gpgv
/usr/bin/gpgv
/usr/lib/apt/methods/gpgv
/usr/share/doc/gpgv
/usr/share/doc/gpgv/changelog.Debian.gz
/usr/share/doc/gpgv/copyright
/usr/share/man/man1/gpgv.1.gz
/var/lib/dpkg/info/gpgv.list
/var/lib/dpkg/info/gpgv.md5sums
请帮忙。我已经好几个月没更新了,现在我想升级到 14.04,但又不想因为全新安装而丢失所有内容。
提前致谢! :)
答案1
中或下的/etc/apt/sources.list
某个文件中有一行损坏。*.list
/etc/apt/sources.list.d/
尝试以下命令来发现它:
grep gpgv: /etc/apt/*.list /etc/apt/sources.list.d/*.list
去掉这条线,你就没事了。
编辑:
由于您以某种方式丢失了/usr/lib/apt/methods/gpgv
文件,因此恢复该文件的一种方法是重新安装apt
:
sudo apt-get install --reinstall apt
现在,它会警告您apt
无法通过身份验证,但只需继续安装即可。