我不知道为什么我突然不能做的东西易于得到,如sudo apt-get update或sudo apt-get install blabla
这是输出uname -a:
Linux adelleodel-X450CC 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
文件 apt-get :
apt-get: ERROR: cannot open `apt-get' (No such file or directory)
Run Code Online (Sandbox Code Playgroud)
猫 /etc/lsb-release:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
Run Code Online (Sandbox Code Playgroud)
ls -l /usr/bin/apt-get :
ls: cannot access /usr/bin/apt-get: No such file or directory
Run Code Online (Sandbox Code Playgroud)
dpkg -l apt :
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-===================-===================-================================================================
rc …Run Code Online (Sandbox Code Playgroud) 我目前正在经历此处描述的症状:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/493154
例子:
127-12:42 djh@noneedto ~$ aptitude search chrome
aptitude: error while loading shared libraries: libapt-pkg-libc6.10-6.so.4.8: cannot open shared object file: No such file or directory
127-12:46 djh@noneedto ~$ apt-get -h
The program 'apt-get' is currently not installed. You can install it by typing:
sudo apt-get install apt
You will have to enable the component called 'main'
Run Code Online (Sandbox Code Playgroud)
所以,我的想法,正如错误中所描述的,只是下载 apt 的 dpkg。不幸的是,这对谷歌来说不是一件容易的事情,因为通常当人们想知道“apt”和“下载”和“安装”时,它是“如何使用apt-get”......但我从哪里得到apt如果它首先丢失?
我正在运行 Ubuntu 10.04.3 LTS (lucid)
更新:根据mailq的回答,这里的修复是:
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_0.7.9ubuntu17.3_amd64.deb
sudo dpkg -i apt_0.7.9ubuntu17.3_amd64.deb
Run Code Online (Sandbox Code Playgroud)
如果您正在解决此问题,请浏览http://archive.ubuntu.com/ubuntu/pool/main/a/apt/并选择适合您系统的软件包。