![由于 dpkg-deb 管道损坏,我无法安装 valgrind,如何修复?](https://linux22.com/image/842185/%E7%94%B1%E4%BA%8E%20dpkg-deb%20%E7%AE%A1%E9%81%93%E6%8D%9F%E5%9D%8F%EF%BC%8C%E6%88%91%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20valgrind%EF%BC%8C%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%EF%BC%9F.png)
hanu@hanu-HP-Pavilion-Sleekbook-14:~/raijin/build_debug$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
locales
The following packages will be upgraded:
locales
1 upgraded, 0 newly installed, 0 to remove and 1008 not upgraded.
Need to get 0 B/3,801 kB of archives.
After this operation, 6,537 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
locales
Install these packages without verification [y/N]? y
Preconfiguring packages ...
(Reading database ... 204496 files and directories currently installed.)
Preparing to replace locales 2.13+git20120306-9 (using .../locales_2.17-92_all.deb) ...
Unpacking replacement locales ...
dpkg: error processing /var/cache/apt/archives/locales_2.17-92_all.deb (--unpack):
trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.17-0ubuntu5
configured to not write apport reports
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/locales_2.17-92_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
hanu@hanu-HP-Pavilion-Sleekbook-14:~/raijin/build_debug$ valgrind
The program 'valgrind' is currently not installed. You can install it by typing:
sudo apt-get install valgrind
答案1
当发现错误时,查看第一的错误,导致后来的错误。
dpkg: error processing /var/cache/apt/archives/locales_2.17-92_all.deb (--unpack):
trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.17-0ubuntu5
问题正如 dpkg 所说:同一个文件validlocale
存在于两个软件包中,因此无法同时安装它们。解决这个问题的方法是升级其他先包。
aptitude install libc-bin
完成后,尝试再次安装 valgrind。
答案2
从 Ubuntu 软件中心安装可能更好。搜索瓦尔格林德
这将允许您安装主程序
以及任何其他可能相关的附加包。