首页
学习
活动
专区
圈层
工具
发布

apt自己
EN

Ask Ubuntu用户
提问于 2020-04-23 18:01:52
回答 1查看 271关注 0票数 0
代码语言:javascript
复制
max@max-Vostro-5568:~/Desktop$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 snapd : Breaks: apt (< 1.6.3) but 1.6.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

此外,我试图消除这些问题,但自我消除会发生。

代码语言:javascript
复制
max@max-Vostro-5568:~/Desktop$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libapt-inst1.5 libapt-pkg4.12 linux-headers-5.3.0-28
  linux-headers-5.3.0-28-generic linux-image-5.3.0-28-generic
  linux-modules-5.3.0-28-generic linux-modules-extra-5.3.0-28-generic
  python3-debconf
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  apt
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3,896 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say!
(Reading database ... 223329 files and directories currently installed.)
Removing apt (1.6.1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
max@max-Vostro-5568:~/Desktop$ apt
bash: /usr/bin/apt: No such file or directory
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-04-23 18:23:54

为Ubuntu 18.04。在终端上试试这个:

For AMD64机器:

代码语言:javascript
复制
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.6.6ubuntu0.1_amd64.deb

然后跑:

代码语言:javascript
复制
sudo dpkg -i apt_1.6.6ubuntu0.1_amd64.deb

英特尔Or x86机器:

代码语言:javascript
复制
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.6.6ubuntu0.1_i386.deb

然后跑:

代码语言:javascript
复制
sudo dpkg -i apt_1.6.6ubuntu0.1_i386.deb

通知:

  • 对于其他版本的Ubuntu,请搜索Ubuntu软件包并选择您的版本,然后下载合适的APT版本并按上面的方式安装它。
  • 请参考这个答案并修复您的源列表和PPA。
  • 始终在安装或升级任何软件包之前运行sudo apt update
  • 如果安装了aptitude,可以使用它来安装APT (在检查了存储库列表之后,引用上面的链接答案),如:sudo aptitude update然后:sudo aptitude install apt
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1229873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档