Linux之Ubuntu无法找到apt-get或apt命令的解决方法

1、若系统安装了aptitude
aptitude show apt-transport-https

显示如下:

软件包:apt-transport-https      
版本号:1.3~rc2
状态: 未安装
优先级:可选
部分:admin
维护者:APT Development Team <deity@lists.debian.org>
体系:amd64
未压缩尺寸:237 k
依赖于: libapt-pkg5.0 (>= 1.3~rc2), libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2)
推荐: ca-certificates
冲突: apt-transport-https:i386
描述:https download transport for APT
 This package enables the usage of 'deb https://foo distro main' lines in the /etc/apt/sources.list so that all package managers using the libapt-pkg library can access metadata and packages available in sources accessible over https
 (Hypertext Transfer Protocol Secure). 
 
 This transport supports server as well as client authentication with certificates.
标签: admin::package-management, protocol::http, protocol::ssl, role::shared-lib, suite::debian, use::downloading
2、到ubuntu安装包商店下载deb安装包然后手动安装
https://packages.ubuntu.com/  ####64位PC选amd64

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
一共需要安装三个deb安装包,安装都需要用dpkg命令

dpkg -i apt-transport-https_1.0.9.8.3_amd64.deb
apt-transport-https_1.0.9.8.3_amd64.deb
apt_1.6.6ubuntu0.1_amd64.deb
libapt-pkg-dev_1.6.6ubuntu0.1_amd64.deb #若缺少依赖,先解决依赖问题,安装这个依赖包
3、修复和更新
apt-get install -f
apt-get update
P.S. aptitude与apt-get可能存在冲突,建议卸载aptitude
  • 8
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值