windows 子系统ubuntu16.04 无法安装php 问题

windows 子系统ubuntu16.04 无法安装php 问题
apt -y install php7.0
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:
 php7.0 : Depends: php7.0-fpm but it is not going to be installed or
                   libapache2-mod-php7.0 but it is not going to be installed or
                   php7.0-cgi but it is not going to be installed
          Depends: php7.0-common (= 7.0.32-0ubuntu0.16.04.1) but it is not going to be installed
 x11proto-core-dev : Depends: xorg-sgml-doctools (>= 1:1.5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)
apt-get -f install 无效
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
(Reading database ... 45595 files and directories currently installed.)
Preparing to unpack .../xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
dpkg: error processing archive /var/cache/apt/archives/xorg-sgml-doctools_1%3a1.11-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/xorg-sgml-doctools/changelog.Debian.gz', which is also in package libjpeg-dev:amd64
 8c-2ubuntu8
Errors were encountered while processing:
 /var/cache/apt/archives/xorg-sgml-doctools_1%3a1.11-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
直接安装也无效
apt -y install xorg-sgml-doctools
Reading package lists... Done
Building dependency tree
Reading state information... Done
dpkg: error processing archive /var/cache/apt/archives/xorg-sgml-doctools_1%3a1.11-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/xorg-sgml-doctools/changelog.Debian.gz', which is also in package libjpeg-dev:amd64
 8c-2ubuntu8
Errors were encountered while processing:
 /var/cache/apt/archives/xorg-sgml-doctools_1%3a1.11-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方法

下载安装包单独安装:https://packages.debian.org/stretch/all/xorg-sgml-doctools/download

wget http://ftp.cn.debian.org/debian/pool/main/x/xorg-sgml-doctools/xorg-sgml-doctools_1.11-1_all.deb

dpkg -i --force-overwrite xorg-sgml-doctools_1.11-1_all.deb

–force-overwrite 参数加上,否则可能有如下提示

dpkg: error processing archive xorg-sgml-doctools_1.11-1_all.deb (--install):
 trying to overwrite '/usr/share/sgml/X11/xorg-xhtml.xsl', which is also in package libjpeg-dev:amd64 8c-2ubuntu8
Errors were encountered while processing:
 xorg-sgml-doctools_1.11-1_all.deb
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值