I am having Debian GNU/Linux 6.0.4 (squeeze). By mistake all the apt files are removed from my OS. I am trying to install package "apt_0.9.7.1_amd64.deb". But while installing the package i am getting the following errors :
Unpacking replacement apt ...
dpkg: dependency problems prevent configuration of apt:
apt depends on libapt-pkg4.12 (>= 0.9.7.1); however:
Package libapt-pkg4.12 is not installed.
apt depends on libstdc++6 (>= 4.6); however:
Version of libstdc++6 on system is 4.4.5-8.
apt depends on debian-archive-keyring; however:
Package debian-archive-keyring is not installed.
dpkg: error processing apt (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
apt
Can anyone know how to install the apt package? or are there any other ways to install the package.
While using any command like sudo apt-get update etc. I am getting error
apt : Depends: debian-archive-keyring but it is not going to be installed
For installing debian-archive-keyring I need apt and for apt I need debian-archive-keyring. Please suggest any solution.
Since apt
is no longer present on your system you'll have to fix this manually.
For me this worked on Ubuntu 13.10:
Downloaded apt_1.0.1ubuntu2.5_amd64.deb
: http://packages.ubuntu.com/trusty/apt
Try to install it using dpkg
:
sudo dpkg -i apt_1.0.1ubuntu2.5_amd64.deb
You might get error like:
Unpacking apt (from apt_1.0.1ubuntu2.5_amd64.deb) ...
dpkg: dependency problems prevent configuration of apt:
apt depends on libapt-pkg4.12 (>= 0.9.16); however:
Version of libapt-pkg4.12:amd64 on system is 0.9.9.1~ubuntu3.
To fix this download correct version of the dependency from the same site .
And install that:
sudo dpkg -i libapt-pkg4.12_1.0.1ubuntu2.5_amd64.deb
Now you should be able to repeat the first command and install apt
.
Note: The package versions may be different depending upon your version of Ubuntu. To locate the correct version use the menu in the header to select your ubuntu version:
尝试su
在 tty 环境(无 gui)中 root,然后尝试apt-get update
和/或apt-get -f install
尝试使用 aptitude 或下载该特定包(如有必要,带有依赖项)并使用 dpkg -i your-downloaded-packages*.deb 安装它
Try this one-liner, it has helped me most of the time, when I get dependency issues.
Enter the following command sudo dpkg install -f
. I hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.