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