首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >apt-得到破碎的包灯栈

apt-得到破碎的包灯栈
EN

Ask Ubuntu用户
提问于 2013-10-10 21:28:39
回答 1查看 1.9K关注 0票数 0

与Ubuntu13.04,我无法安装任何部分的灯堆栈,因为损坏的软件包。我试过了

代码语言:javascript
复制
sudo apt-get -f install php5
sudo apt-get --purge remove php5 
sudo apt-get autoremove 

以及尝试安装顺序的所有排列中列出的所有依赖项。

代码语言:javascript
复制
sudo apt-get --fix-broken --ignore-hold install php5
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:
 php5 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             libapache2-mod-php5filter (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-cgi (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-fpm (>= 5.4.9-4ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

会喜欢一些洞察力,我认为这与发行版升级有关

编辑:一些更多的输出形式apt

代码语言:javascript
复制
root@ascension:/home/kevin# dpkg --configure -a
root@ascension:/home/kevin# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get install php5
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:
 php5 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2) but it is not going to be     installed or
             libapache2-mod-php5filter (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-cgi (>= 5.4.9-4ubuntu2) but it is not going to be installed or
             php5-fpm (>= 5.4.9-4ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@ascension:/home/kevin# apt-get remove php5-fpm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'php5-fpm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get remove php5-cgi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'php5-cgi' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get remove libapache2-mod-php5filter
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'libapache2-mod-php5filter' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ascension:/home/kevin# apt-get install apache2
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 : Depends: apache2-mpm-worker (= 2.2.22-6ubuntu5) but it is not going to be     installed or
                apache2-mpm-prefork (= 2.2.22-6ubuntu5) but it is not going to be installed or
                apache2-mpm-event (= 2.2.22-6ubuntu5) but it is not going to be installed or
                apache2-mpm-itk (= 2.2.22-6ubuntu5) but it is not going to be installed
       Depends: apache2.2-common (= 2.2.22-6ubuntu5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

编辑,per @Braiam

apt-缓存输出:

代码语言:javascript
复制
php5:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
libapache2-mod-php5:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
php5-cgi:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
php5-fpm:
Installed: (none)
Candidate: 5.4.9-4ubuntu2
Version table:
 5.4.9-4ubuntu2 0
    500 http://us.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages

sources.list &/etc/apt/sources.list.list.d/*..list的cat

代码语言:javascript
复制
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ .Trashes/501/dists/raring/main/binary-i386/

# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ .Trashes/501/dists/raring/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/ quantal main restricted
# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release amd64 (20121017.5)]/.Trashes/501/ raring main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ raring main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://us.archive.ubuntu.com/ubuntu/ raring universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ raring multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.


## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu quantal partner
# deb-src http://archive.canonical.com/ubuntu quantal partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu raring main
# deb-src http://extras.ubuntu.com/ubuntu raring main

#spotify yo
# deb http://repository.spotify.com stable non-free
deb http://us.archive.ubuntu.com/ubuntu/ raring-updates universe main restricted multiverse
deb http://security.ubuntu.com/ubuntu/ raring-security universe main restricted multiverse

正如您所看到的,所有的条目都是令人垂涎三尺的,而且似乎没有任何其他问题。新鲜的想法。

EN

回答 1

Ask Ubuntu用户

发布于 2013-10-10 21:57:04

安装php5:

代码语言:javascript
复制
sudo apt-get install php5

安装apache:

代码语言:javascript
复制
sudo apt-get install apache2

要将php5与apache2结合使用,请安装:

代码语言:javascript
复制
sudo apt-get install libapache2-mod-php5

安装mysql客户端和服务器:

代码语言:javascript
复制
sudo apt-get install mysql-client mysql-server

就这样,你已经安装了你的灯罩!

一艘班轮:

代码语言:javascript
复制
sudo apt-get install php5 apache2 libapache2-mod-php5 mysql-client mysql-server
票数 -1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/356475

复制
相关文章

相似问题

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