gpt4 book ai didi

apache - 由于 Depends,无法安装 apache2-dev,用于 apxs2 安装

转载 作者:行者123 更新时间:2023-12-04 18:26:44 24 4
gpt4 key购买 nike

我无法运行:

sudo apt-get install apache2-dev

我得到的是:

Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: apache2-dev :

Depends: libapr1-dev but it is not going to be installed

Depends: libaprutil1-dev but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

总的来说,我想安装 apxs2 来运行我的 phpbrew。但是对于 apxs2,您需要安装一些软件包,例如 apache2-dev

版本: Apache 2/2.4.20Ubuntuphpbrew 1.22.5

已经测试了以下命令但没有成功:

  • sudo apt-get 更新
  • sudo apt-get 升级
  • sudo apt-get -u dist-upgrade
  • sudo apt-get autoclean
  • sudo apt-get clean
  • sudo apt-get build-dep apache2-dev
  • sudo apt-get install httpd-devel
  • sudo apt-get -y install apache2-dev apache2-devel
  • sudo apt-get install apache2-threaded-dev
  • sudo apt-get install apache-prefork-dev
  • sudo apt-get install libaprutil1-dev
  • sudo dpkg --purge --force-depends "apache*"
  • sudo apt-get install libapr1-dev

最佳答案

可以通过变通方法实现。所以首先你需要安装 aptitude 来决定解决这个问题的方法。所以:

sudo apt-get install aptitude

之后,运行:

sudo aptitude install apache-dev

这里你得到:

The following NEW packages will be installed:
apache2-dev comerr-dev{a} krb5-multidev{a} libapr1-dev{ab} libaprutil1-dev{ab} libexpat1-dev{a} libgssrpc4{a}
libkadm5clnt-mit9{a} libkadm5srv-mit9{a} libkdb5-7{a} libldap2-dev{a} libmysqlclient-dev{a} libpcre16-3{a} libpcre3-dev{a}
libpcre32-3{a} libpcrecpp0{a} libpq-dev{a} libpq5{a} libsctp-dev{a} libsctp1{a} lksctp-tools{a} uuid-dev{a}
0 packages upgraded, 22 newly installed, 0 to remove and 2 not upgraded.
Need to get 4,304 kB of archives. After unpacking 28.5 MB will be used.
The following packages have unmet dependencies:
libaprutil1-dev : Depends: libaprutil1 (= 1.5.3-1) but 1.5.4-1+deb.sury.org~trusty+1 is installed.
libapr1-dev : Depends: libapr1 (= 1.5.0-1) but 1.5.2-4+deb.sury.org~trusty+1 is installed.
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1) apache2-dev [Not Installed]
2) libapr1-dev [Not Installed]
3) libaprutil1-dev [Not Installed]

Accept this solution? [Y/n/q/?] n

如您所见,键入 nEnter。现在你得到了一个更好的解决方案:

The following actions will resolve these dependencies:

Remove the following packages:
1) libaprutil1-dbd-sqlite3

Install the following packages:
2) libaprutil1-dbd-pgsql [1.5.3-1 (trusty)]

Downgrade the following packages:
3) libapr1 [1.5.2-4+deb.sury.org~trusty+1 (now) -> 1.5.0-1 (trusty)]
4) libaprutil1 [1.5.4-1+deb.sury.org~trusty+1 (now) -> 1.5.3-1 (trusty)]
5) libaprutil1-ldap [1.5.4-1+deb.sury.org~trusty+1 (now) -> 1.5.3-1 (trusty)]

Accept this solution? [Y/n/q/?] Y

键入 YEnter。现在你得到了你需要的:

The following packages will be DOWNGRADED:
libapr1 libaprutil1 libaprutil1-ldap
The following NEW packages will be installed:
apache2-dev comerr-dev{a} krb5-multidev{a} libapr1-dev{a} libaprutil1-dbd-mysql{a} libaprutil1-dev{a} libexpat1-dev{a}
libgssrpc4{a} libkadm5clnt-mit9{a} libkadm5srv-mit9{a} libkdb5-7{a} libldap2-dev{a} libmysqlclient-dev{a} libpcre16-3{a}
libpcre3-dev{a} libpcre32-3{a} libpcrecpp0{a} libpq-dev{a} libpq5{a} libsctp-dev{a} libsctp1{a} lksctp-tools{a} uuid-dev{a}
The following packages will be REMOVED:
libaprutil1-dbd-sqlite3{a}
0 packages upgraded, 23 newly installed, 3 downgraded, 1 to remove and 2 not upgraded.
Need to get 4,486 kB of archives. After unpacking 28.5 MB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main libpcre16-3 amd64 2:8.39-1+deb.sury.org~trusty+1 [251 kB]
Get: 2 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-ldap amd64 1.5.3-1 [8,634 B]
Get: 3 http://archive.ubuntu.com/ubuntu/ trusty/universe libaprutil1-dbd-mysql amd64 1.5.3-1 [12.2 kB]
Get: 4 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1 amd64 1.5.3-1 [76.4 kB]
Get: 5 http://archive.ubuntu.com/ubuntu/ trusty/main libapr1 amd64 1.5.0-1 [85.1 kB]
Get: 6 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main libpcre32-3 amd64 2:8.39-1+deb.sury.org~trusty+1 [243 kB]
Get: 7 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libgssrpc4 amd64 1.12+dfsg-2ubuntu5.2 [53.1 kB]
Get: 8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libkadm5clnt-mit9 amd64 1.12+dfsg-2ubuntu5.2 [36.2 kB]
Get: 9 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main libpcrecpp0 amd64 2:8.39-1+deb.sury.org~trusty+1 [149 kB]
Get: 10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libkdb5-7 amd64 1.12+dfsg-2ubuntu5.2 [36.2 kB]
Get: 11 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libkadm5srv-mit9 amd64 1.12+dfsg-2ubuntu5.2 [50.4 kB]
Get: 12 http://archive.ubuntu.com/ubuntu/ trusty/main libsctp1 amd64 1.0.15+dfsg-1 [9,226 B]
Get: 13 http://archive.ubuntu.com/ubuntu/ trusty-updates/main uuid-dev amd64 2.20.1-5.1ubuntu20.7 [23.7 kB]
Get: 14 http://archive.ubuntu.com/ubuntu/ trusty/main libsctp-dev amd64 1.0.15+dfsg-1 [64.4 kB]
Get: 15 http://archive.ubuntu.com/ubuntu/ trusty/main libapr1-dev amd64 1.5.0-1 [599 kB]
Get: 16 http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main libpcre3-dev amd64 2:8.39-1+deb.sury.org~trusty+1 [630 kB]
Get: 17 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libldap2-dev amd64 2.4.31-1+nmu2ubuntu8.3 [259 kB]
Get: 18 http://ppa.launchpad.net/eugenesan/ppa/ubuntu/ trusty/main comerr-dev amd64 2.1-1.42.13-1ubuntu1+20151129~eugenesan~trusty1 [38.7 kB]
Get: 19 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
Get: 20 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libpq5 amd64 9.3.13-0ubuntu0.14.04 [78.6 kB]
Get: 21 http://archive.ubuntu.com/ubuntu/ trusty-updates/main krb5-multidev amd64 1.12+dfsg-2ubuntu5.2 [111 kB]
Get: 22 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libpq-dev amd64 9.3.13-0ubuntu0.14.04 [140 kB]
Get: 23 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient-dev amd64 5.5.50-0ubuntu0.14.04.1 [865 kB]
Get: 24 http://archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-dev amd64 1.5.3-1 [334 kB]
Get: 25 http://archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-dev amd64 2.4.7-1ubuntu4.13 [166 kB]
Get: 26 http://archive.ubuntu.com/ubuntu/ trusty/main lksctp-tools amd64 1.0.15+dfsg-1 [51.3 kB]
Fetched 4,486 kB in 2s (1,805 kB/s)
dpkg: warning: downgrading libaprutil1-ldap:amd64 from 1.5.4-1+deb.sury.org~trusty+1 to 1.5.3-1
(Reading database ... 753970 files and directories currently installed.)
Preparing to unpack .../libaprutil1-ldap_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.5.3-1) over (1.5.4-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libaprutil1-dbd-mysql:amd64.
Preparing to unpack .../libaprutil1-dbd-mysql_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-dbd-mysql:amd64 (1.5.3-1) ...
dpkg: libaprutil1-dbd-sqlite3:amd64: dependency problems, but removing anyway as you requested:
apache2-bin depends on libaprutil1-dbd-sqlite3 | libaprutil1-dbd-mysql | libaprutil1-dbd-odbc | libaprutil1-dbd-pgsql | libaprutil1-dbd-freetds; however:
Package libaprutil1-dbd-sqlite3:amd64 is to be removed.
Package libaprutil1-dbd-mysql:amd64 is not configured yet.
Package libaprutil1-dbd-odbc is not installed.
Package libaprutil1-dbd-pgsql is not installed.
Package libaprutil1-dbd-freetds is not installed.

(Reading database ... 753974 files and directories currently installed.)
Removing libaprutil1-dbd-sqlite3:amd64 (1.5.4-1+deb.sury.org~trusty+1) ...
dpkg: warning: downgrading libaprutil1:amd64 from 1.5.4-1+deb.sury.org~trusty+1 to 1.5.3-1
(Reading database ... 753970 files and directories currently installed.)
Preparing to unpack .../libaprutil1_1.5.3-1_amd64.deb ...
Unpacking libaprutil1:amd64 (1.5.3-1) over (1.5.4-1+deb.sury.org~trusty+1) ...
dpkg: warning: downgrading libapr1:amd64 from 1.5.2-4+deb.sury.org~trusty+1 to 1.5.0-1
Preparing to unpack .../libapr1_1.5.0-1_amd64.deb ...
Unpacking libapr1:amd64 (1.5.0-1) over (1.5.2-4+deb.sury.org~trusty+1) ...
Selecting previously unselected package libgssrpc4:amd64.
Preparing to unpack .../libgssrpc4_1.12+dfsg-2ubuntu5.2_amd64.deb ...
Unpacking libgssrpc4:amd64 (1.12+dfsg-2ubuntu5.2) ...
Selecting previously unselected package libkadm5clnt-mit9:amd64.
Preparing to unpack .../libkadm5clnt-mit9_1.12+dfsg-2ubuntu5.2_amd64.deb ...
Unpacking libkadm5clnt-mit9:amd64 (1.12+dfsg-2ubuntu5.2) ...
Selecting previously unselected package libkdb5-7:amd64.
Preparing to unpack .../libkdb5-7_1.12+dfsg-2ubuntu5.2_amd64.deb ...
Unpacking libkdb5-7:amd64 (1.12+dfsg-2ubuntu5.2) ...
Selecting previously unselected package libkadm5srv-mit9:amd64.
Preparing to unpack .../libkadm5srv-mit9_1.12+dfsg-2ubuntu5.2_amd64.deb ...
Unpacking libkadm5srv-mit9:amd64 (1.12+dfsg-2ubuntu5.2) ...
Selecting previously unselected package libpcre16-3:amd64.
Preparing to unpack .../libpcre16-3_2%3a8.39-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libpcre16-3:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libpcre32-3:amd64.
Preparing to unpack .../libpcre32-3_2%3a8.39-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libpcre32-3:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libsctp1:amd64.
Preparing to unpack .../libsctp1_1.0.15+dfsg-1_amd64.deb ...
Unpacking libsctp1:amd64 (1.0.15+dfsg-1) ...
Selecting previously unselected package uuid-dev.
Preparing to unpack .../uuid-dev_2.20.1-5.1ubuntu20.7_amd64.deb ...
Unpacking uuid-dev (2.20.1-5.1ubuntu20.7) ...
Selecting previously unselected package libsctp-dev.
Preparing to unpack .../libsctp-dev_1.0.15+dfsg-1_amd64.deb ...
Unpacking libsctp-dev (1.0.15+dfsg-1) ...
Selecting previously unselected package libapr1-dev.
Preparing to unpack .../libapr1-dev_1.5.0-1_amd64.deb ...
Unpacking libapr1-dev (1.5.0-1) ...
Selecting previously unselected package libldap2-dev:amd64.
Preparing to unpack .../libldap2-dev_2.4.31-1+nmu2ubuntu8.3_amd64.deb ...
Unpacking libldap2-dev:amd64 (2.4.31-1+nmu2ubuntu8.3) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../libexpat1-dev_2.1.0-4ubuntu1.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
Selecting previously unselected package libpcrecpp0:amd64.
Preparing to unpack .../libpcrecpp0_2%3a8.39-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libpcrecpp0:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libpcre3-dev:amd64.
Preparing to unpack .../libpcre3-dev_2%3a8.39-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libpcre3-dev:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package libpq5.
Preparing to unpack .../libpq5_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking libpq5 (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package comerr-dev.
Preparing to unpack .../comerr-dev_2.1-1.42.13-1ubuntu1+20151129~eugenesan~trusty1_amd64.deb ...
Unpacking comerr-dev (2.1-1.42.13-1ubuntu1+20151129~eugenesan~trusty1) ...
Selecting previously unselected package krb5-multidev.
Preparing to unpack .../krb5-multidev_1.12+dfsg-2ubuntu5.2_amd64.deb ...
Unpacking krb5-multidev (1.12+dfsg-2ubuntu5.2) ...
Selecting previously unselected package libpq-dev.
Preparing to unpack .../libpq-dev_9.3.13-0ubuntu0.14.04_amd64.deb ...
Unpacking libpq-dev (9.3.13-0ubuntu0.14.04) ...
Selecting previously unselected package libmysqlclient-dev.
Preparing to unpack .../libmysqlclient-dev_5.5.50-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient-dev (5.5.50-0ubuntu0.14.04.1) ...
Selecting previously unselected package libaprutil1-dev.
Preparing to unpack .../libaprutil1-dev_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-dev (1.5.3-1) ...
Selecting previously unselected package apache2-dev.
Preparing to unpack .../apache2-dev_2.4.7-1ubuntu4.13_amd64.deb ...
Unpacking apache2-dev (2.4.7-1ubuntu4.13) ...
Selecting previously unselected package lksctp-tools.
Preparing to unpack .../lksctp-tools_1.0.15+dfsg-1_amd64.deb ...
Unpacking lksctp-tools (1.0.15+dfsg-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for doc-base (0.10.5) ...
Processing 2 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for install-info (5.2.0.dfsg.1-2) ...
Setting up libapr1:amd64 (1.5.0-1) ...
Setting up libaprutil1:amd64 (1.5.3-1) ...
Setting up libaprutil1-ldap:amd64 (1.5.3-1) ...
Setting up libaprutil1-dbd-mysql:amd64 (1.5.3-1) ...
Setting up libgssrpc4:amd64 (1.12+dfsg-2ubuntu5.2) ...
Setting up libkadm5clnt-mit9:amd64 (1.12+dfsg-2ubuntu5.2) ...
Setting up libkdb5-7:amd64 (1.12+dfsg-2ubuntu5.2) ...
Setting up libkadm5srv-mit9:amd64 (1.12+dfsg-2ubuntu5.2) ...
Setting up libpcre16-3:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Setting up libpcre32-3:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Setting up libsctp1:amd64 (1.0.15+dfsg-1) ...
Setting up uuid-dev (2.20.1-5.1ubuntu20.7) ...
Setting up libsctp-dev (1.0.15+dfsg-1) ...
Setting up libapr1-dev (1.5.0-1) ...
Setting up libldap2-dev:amd64 (2.4.31-1+nmu2ubuntu8.3) ...
Setting up libexpat1-dev:amd64 (2.1.0-4ubuntu1.3) ...
Setting up libpcrecpp0:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Setting up libpcre3-dev:amd64 (2:8.39-1+deb.sury.org~trusty+1) ...
Setting up libpq5 (9.3.13-0ubuntu0.14.04) ...
Setting up comerr-dev (2.1-1.42.13-1ubuntu1+20151129~eugenesan~trusty1) ...
Setting up krb5-multidev (1.12+dfsg-2ubuntu5.2) ...
Setting up libpq-dev (9.3.13-0ubuntu0.14.04) ...
Setting up libmysqlclient-dev (5.5.50-0ubuntu0.14.04.1) ...
Setting up libaprutil1-dev (1.5.3-1) ...
Setting up apache2-dev (2.4.7-1ubuntu4.13) ...
Setting up lksctp-tools (1.0.15+dfsg-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...

并且安装了这个apache-dev

现在 apxs2 可以用作 phpbrew 的参数。

关于apache - 由于 Depends,无法安装 apache2-dev,用于 apxs2 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38614058/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com