首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在debian中安装php时出现问题

问在debian中安装php时出现问题
EN

Stack Overflow用户
提问于 2018-07-08 16:13:44
回答 1查看 2.4K关注 0票数 3

我已经尝试过在debian 9中安装php,但我没有使用。

我做了这个命令:

代码语言:javascript
复制
 sudo apt-get -y install php7.0 libapache2-mod-php7.0

错误发生后:

代码语言:javascript
复制
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:
 libapache2-mod-php7.0 : Depends: php7.0-cli but it is not going to be installed
                         Depends: php7.0-opcache but it is not going to be installed
                         Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed
E: Unable to correct problems, you have held broken packages.

(我试图安装这个依赖项,但我做不到,总是依赖于另一个依赖项)

/etc/apt/sources.list .列表

代码语言:javascript
复制
# 

# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$

# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$

deb http://ftp.br.debian.org/debian/ stretch main
deb-src http://ftp.br.debian.org/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://ftp.br.debian.org/debian/ stretch-updates main
deb-src http://ftp.br.debian.org/debian/ stretch-updates main

deb http://http.us.debian.org/debian/ wheezy main contrib non-free

有人能帮我吗?

先谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-09 15:04:01

似乎您已经合并到您的apt文件喘息和扩展版本的debian。尝试删除文件的最后一行:

代码语言:javascript
复制
deb http://http.us.debian.org/debian/ wheezy main contrib non-free

然后尝试一个apt更新命令。然后您可以尝试安装php7。

但是,请注意,如果您是从一个喘息安装,你必须升级它来拉伸在尝试安装php7.0之前

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51233870

复制
相关文章

相似问题

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