Ubuntu 重装 apt/apt-get
参考链接1:https://blog.csdn.net/A_Thinking_Reed_/article/details/99709620参考链接2:安装aptitude后apt实效ERROR由于各种原因,在安装 aptitude 的时候直接默认,将原来的管理软件 apt-get 直接卸载了,由于是服务器上,不是一个人用,可把我吓坏了。。。sudo: apt: command not founds
ERROR
由于各种原因,在安装 aptitude
的时候直接默认,将原来的管理软件 apt-get
直接卸载了,由于是服务器上,不是一个人用,可把我吓坏了。。。
sudo: apt: command not found
sudo: apt-get: command not found
个人纪录(仅供个人查看)
- 参考链接1:http://www.xitongzhijia.net/xtjc/20150129/36438.html
Ubuntu
安装qbittorrent
原因
qbittorrent : Depends: libqt5xml5 (>= 5.0.2) but it is not going to be installed
apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZTI17pkgAcquireStatus2 version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
Unable to Correct Problems 'You have Held Broken Packages'
安装 qbittorrent
时,添加下载源之后,使用 apt-get install
安装时,提示缺少相应的依赖文件,一步步追溯,最终定位到了 You have Held Broken Packages
这个错误,之后就是安装 aptitude
导致的问题了。
之后成功安装的方式是:将有冲突的依赖包卸载,然后重新安装即可。
sudo apt-get remove --purge libqt5xml5
sudo add-apt-repository ppa:hydr0g3n/qbittorrent-stable
sudo apt-get update && sudo apt-get install qbittorrent
解决方法
STEP1. 卸载 aptitude
sudo dpkg -r aptitude
STEP2. 下载 apt 安装所需依赖文件
可直接从这里获取(不需要下载积分!):https://download.csdn.net/download/qq_40750972/85197937
ubuntu-keyring_2018.02.28_all.deb
下载链接:http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/
libapt-pkg5.0_1.6.14_amd64.deb
apt_1.6.14_amd64.deb
注意,笔者的服务器为 Ubuntu18.04 LTS
,以上三者如果版本不匹配不兼容会导致无法安装成功,因此如果你的系统版本和我一样,推荐使用以上的版本,不然会像我一样试办天😿。
STEP3. 安装依赖文件包
注意:必须按照以下顺序进行安装!!!
sudo dpkg -i ubuntu-keyring_2018.02.28_all.deb
sudo dpkg -i libapt-pkg5.0_1.6.14_amd64.deb
sudo dpkg -i apt_1.6.14_amd64.deb
上一张效果图:
提示:如果版本不匹配,安装不成功,可以下载不同的版本尝试,再次安装会覆盖之前的,不会存在低版本不能覆盖已安装的高版本的情况,这点还是比较好的,后面就是慢慢尝试了!
记录
不要轻易使用该命令:https://blog.csdn.net/xpy870663266/article/details/94742491
sudo apt-get install aptitude
否者可能会导致以上问题!
更多推荐
所有评论(0)