强制安装apt-get

aWe*_*per 24 installation 10.04 apt

我尝试使用sudo apt-get install beanstalkd(也使用-f选项)安装 beanstalkd,但出现以下错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  beanstalkd: Depends: libevent-1.4-2 (>= 1.4.13-stable) but it is not going to be installed
  mysql-server-5.1: Depends: mysql-client-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
                    Depends: libmysqlclient16 (>= 5.1.21-1) but it is not going to be installed
                    Depends: mysql-server-core-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
                    PreDepends: mysql-common (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Run Code Online (Sandbox Code Playgroud)

小智 38

首先从存储库下载 deb 包

apt-get download <package_name>
Run Code Online (Sandbox Code Playgroud)

安装 deb 文件(它应该在当前文件夹中)

sudo dpkg -i <downloaded_package_deb_file>
Run Code Online (Sandbox Code Playgroud)

  • @Ads20000,它可能被否决了,因为仅仅`-i` 不会解决任何依赖问题。然而,如果ineicu 已经展示了`--force-depends` 技巧,也许不会发生downvote:`sudo dpkg --force-depends -i &lt;name.deb&gt;` 将安装一个包,即使考虑了依赖丢失的。 (2认同)

小智 7

尝试

sudo apt-get install -f
Run Code Online (Sandbox Code Playgroud)

终端中没有包裹。

如果这仍然给出依赖项的错误,那么您将不得不发出

sudo apt-get remove beanstalkd
Run Code Online (Sandbox Code Playgroud)

然后尝试

sudo apt-get install mysql-server beanstalkd
Run Code Online (Sandbox Code Playgroud)

这应该安装 mysql 依赖项和 beanstalk。


小智 4

尝试跑步sudo apt-get --fix-missing install


归档时间:

查看次数:

250052 次

最近记录:

6 年,4 月 前