ubuntu16.04 php安裝失敗,提示依賴關係使得php7.0 的配置工作不能繼續

來源:互聯網
上載者:User
在ubuntu16.04上安裝php7.0提示這個:

pcd@pcd-All-Series:~/案頭$ sudo apt-get install php7.0[sudo] pcd 的密碼: 正在讀取軟體包列表... 完成正在分析軟體包的相依樹狀結構       正在讀取狀態資訊... 完成       php7.0 已經是最新版 (7.0.10-2+deb.sury.org~xenial+1)。升級了 0 個軟體包,新安裝了 0 個軟體包,要卸載 0 個軟體包,有 0 個軟體包未被升級。有 3 個軟體包沒有被完整安裝或卸載。解壓縮後會消耗 0 B 的額外空間。您希望繼續執行嗎? [Y/n] y正在設定 libapache2-mod-php7.0 (7.0.10-2+deb.sury.org~xenial+1) ...Not replacing deleted config file /etc/php/7.0/apache2/php.iniphp_invoke: Enable module xmlwriter for apache2 sapiphp_invoke: Enable module xml for apache2 sapiphp_invoke: Enable module fileinfo for apache2 sapiphp_invoke: Enable module shmop for apache2 sapiphp_invoke: Enable module calendar for apache2 sapiphp_invoke: Enable module sysvsem for apache2 sapiphp_invoke: Enable module exif for apache2 sapiphp_invoke: Enable module xmlreader for apache2 sapiphp_invoke: Enable module json for apache2 sapiphp_invoke: Enable module tokenizer for apache2 sapiphp_invoke: Enable module simplexml for apache2 sapiphp_invoke: Enable module dom for apache2 sapiphp_invoke: Enable module posix for apache2 sapiphp_invoke: Enable module gettext for apache2 sapiphp_invoke: Enable module sysvmsg for apache2 sapiphp_invoke: Enable module sysvshm for apache2 sapiphp_invoke: Enable module wddx for apache2 sapiphp_invoke: Enable module xsl for apache2 sapiphp_invoke: Enable module readline for apache2 sapiphp_invoke: Enable module ctype for apache2 sapiphp_invoke: Enable module phar for apache2 sapiphp_invoke: Enable module ftp for apache2 sapiphp_invoke: Enable module opcache for apache2 sapiphp_invoke: Enable module pdo for apache2 sapiphp_invoke: Enable module sockets for apache2 sapiphp_invoke: Enable module iconv for apache2 sapidpkg: 處理軟體包 libapache2-mod-php7.0 (--configure)時出錯: 子進程 已安裝 post-installation 指令碼 返回錯誤狀態 1正在設定 php7.0-fpm (7.0.10-2+deb.sury.org~xenial+1) ...Not replacing deleted config file /etc/php/7.0/fpm/php.iniphp_invoke: Enable module xmlwriter for fpm sapiphp_invoke: Enable module xml for fpm sapiphp_invoke: Enable module fileinfo for fpm sapiphp_invoke: Enable module shmop for fpm sapiphp_invoke: Enable module calendar for fpm sapiphp_invoke: Enable module sysvsem for fpm sapiphp_invoke: Enable module exif for fpm sapiphp_invoke: Enable module xmlreader for fpm sapiphp_invoke: Enable module json for fpm sapiphp_invoke: Enable module tokenizer for fpm sapiphp_invoke: Enable module simplexml for fpm sapiphp_invoke: Enable module dom for fpm sapiphp_invoke: Enable module posix for fpm sapiphp_invoke: Enable module gettext for fpm sapiphp_invoke: Enable module sysvmsg for fpm sapiphp_invoke: Enable module sysvshm for fpm sapiphp_invoke: Enable module wddx for fpm sapiphp_invoke: Enable module xsl for fpm sapiphp_invoke: Enable module readline for fpm sapiphp_invoke: Enable module ctype for fpm sapiphp_invoke: Enable module phar for fpm sapiphp_invoke: Enable module ftp for fpm sapiphp_invoke: Enable module opcache for fpm sapiphp_invoke: Enable module pdo for fpm sapiphp_invoke: Enable module sockets for fpm sapiphp_invoke: Enable module iconv for fpm sapiNOTICE: Not enabling PHP 7.0 FPM by default.NOTICE: To enable PHP 7.0 FPM in Apache2 do:NOTICE: a2enmod proxy_fcgi setenvifNOTICE: a2enconf php7.0-fpmNOTICE: You are seeing this message because you have apache2 package installed.initctl: 無法串連到 Upstart: Failed to connect to socket /com/ubuntu/upstart: 拒絕串連insserv: warning: script 'scrapyd' missing LSB tags and overridesinsserv: Default-Start undefined, assuming empty start runlevel(s) for script `scrapyd'insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `scrapyd'Job for php7.0-fpm.service failed because the control process exited with error code. See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.invoke-rc.d: initscript php7.0-fpm, action "restart" failed.dpkg: 處理軟體包 php7.0-fpm (--configure)時出錯: 子進程 已安裝 post-installation 指令碼 返回錯誤狀態 1dpkg: 依賴關係問題使得 php7.0 的配置工作不能繼續: php7.0 依賴於 libapache2-mod-php7.0 | php7.0-fpm | php7.0-cgi;然而:  軟體包 libapache2-mod-php7.0 尚未配置。  軟體包 php7.0-fpm 尚未配置。  未安裝軟體包 php7.0-cgi。dpkg: 處理軟體包 php7.0 (--configure)時出錯: 依賴關係問題 - 仍未被配置因為錯誤訊息指示這是由於上一個問題導致的錯誤,沒有寫入 apport 報告。                                                                    在處理時有錯誤發生: libapache2-mod-php7.0 php7.0-fpm php7.0E: Sub-process /usr/bin/dpkg returned an error code (1)pcd@pcd-All-Series:~/案頭$ 

在這種情況下,我安裝其他php相關的軟體也是這樣,由於配置工作不能繼續,真的無法解決了,來請教一下這裡的大神

回複內容:

在ubuntu16.04上安裝php7.0提示這個:

pcd@pcd-All-Series:~/案頭$ sudo apt-get install php7.0[sudo] pcd 的密碼: 正在讀取軟體包列表... 完成正在分析軟體包的相依樹狀結構       正在讀取狀態資訊... 完成       php7.0 已經是最新版 (7.0.10-2+deb.sury.org~xenial+1)。升級了 0 個軟體包,新安裝了 0 個軟體包,要卸載 0 個軟體包,有 0 個軟體包未被升級。有 3 個軟體包沒有被完整安裝或卸載。解壓縮後會消耗 0 B 的額外空間。您希望繼續執行嗎? [Y/n] y正在設定 libapache2-mod-php7.0 (7.0.10-2+deb.sury.org~xenial+1) ...Not replacing deleted config file /etc/php/7.0/apache2/php.iniphp_invoke: Enable module xmlwriter for apache2 sapiphp_invoke: Enable module xml for apache2 sapiphp_invoke: Enable module fileinfo for apache2 sapiphp_invoke: Enable module shmop for apache2 sapiphp_invoke: Enable module calendar for apache2 sapiphp_invoke: Enable module sysvsem for apache2 sapiphp_invoke: Enable module exif for apache2 sapiphp_invoke: Enable module xmlreader for apache2 sapiphp_invoke: Enable module json for apache2 sapiphp_invoke: Enable module tokenizer for apache2 sapiphp_invoke: Enable module simplexml for apache2 sapiphp_invoke: Enable module dom for apache2 sapiphp_invoke: Enable module posix for apache2 sapiphp_invoke: Enable module gettext for apache2 sapiphp_invoke: Enable module sysvmsg for apache2 sapiphp_invoke: Enable module sysvshm for apache2 sapiphp_invoke: Enable module wddx for apache2 sapiphp_invoke: Enable module xsl for apache2 sapiphp_invoke: Enable module readline for apache2 sapiphp_invoke: Enable module ctype for apache2 sapiphp_invoke: Enable module phar for apache2 sapiphp_invoke: Enable module ftp for apache2 sapiphp_invoke: Enable module opcache for apache2 sapiphp_invoke: Enable module pdo for apache2 sapiphp_invoke: Enable module sockets for apache2 sapiphp_invoke: Enable module iconv for apache2 sapidpkg: 處理軟體包 libapache2-mod-php7.0 (--configure)時出錯: 子進程 已安裝 post-installation 指令碼 返回錯誤狀態 1正在設定 php7.0-fpm (7.0.10-2+deb.sury.org~xenial+1) ...Not replacing deleted config file /etc/php/7.0/fpm/php.iniphp_invoke: Enable module xmlwriter for fpm sapiphp_invoke: Enable module xml for fpm sapiphp_invoke: Enable module fileinfo for fpm sapiphp_invoke: Enable module shmop for fpm sapiphp_invoke: Enable module calendar for fpm sapiphp_invoke: Enable module sysvsem for fpm sapiphp_invoke: Enable module exif for fpm sapiphp_invoke: Enable module xmlreader for fpm sapiphp_invoke: Enable module json for fpm sapiphp_invoke: Enable module tokenizer for fpm sapiphp_invoke: Enable module simplexml for fpm sapiphp_invoke: Enable module dom for fpm sapiphp_invoke: Enable module posix for fpm sapiphp_invoke: Enable module gettext for fpm sapiphp_invoke: Enable module sysvmsg for fpm sapiphp_invoke: Enable module sysvshm for fpm sapiphp_invoke: Enable module wddx for fpm sapiphp_invoke: Enable module xsl for fpm sapiphp_invoke: Enable module readline for fpm sapiphp_invoke: Enable module ctype for fpm sapiphp_invoke: Enable module phar for fpm sapiphp_invoke: Enable module ftp for fpm sapiphp_invoke: Enable module opcache for fpm sapiphp_invoke: Enable module pdo for fpm sapiphp_invoke: Enable module sockets for fpm sapiphp_invoke: Enable module iconv for fpm sapiNOTICE: Not enabling PHP 7.0 FPM by default.NOTICE: To enable PHP 7.0 FPM in Apache2 do:NOTICE: a2enmod proxy_fcgi setenvifNOTICE: a2enconf php7.0-fpmNOTICE: You are seeing this message because you have apache2 package installed.initctl: 無法串連到 Upstart: Failed to connect to socket /com/ubuntu/upstart: 拒絕串連insserv: warning: script 'scrapyd' missing LSB tags and overridesinsserv: Default-Start undefined, assuming empty start runlevel(s) for script `scrapyd'insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `scrapyd'Job for php7.0-fpm.service failed because the control process exited with error code. See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.invoke-rc.d: initscript php7.0-fpm, action "restart" failed.dpkg: 處理軟體包 php7.0-fpm (--configure)時出錯: 子進程 已安裝 post-installation 指令碼 返回錯誤狀態 1dpkg: 依賴關係問題使得 php7.0 的配置工作不能繼續: php7.0 依賴於 libapache2-mod-php7.0 | php7.0-fpm | php7.0-cgi;然而:  軟體包 libapache2-mod-php7.0 尚未配置。  軟體包 php7.0-fpm 尚未配置。  未安裝軟體包 php7.0-cgi。dpkg: 處理軟體包 php7.0 (--configure)時出錯: 依賴關係問題 - 仍未被配置因為錯誤訊息指示這是由於上一個問題導致的錯誤,沒有寫入 apport 報告。                                                                    在處理時有錯誤發生: libapache2-mod-php7.0 php7.0-fpm php7.0E: Sub-process /usr/bin/dpkg returned an error code (1)pcd@pcd-All-Series:~/案頭$ 

在這種情況下,我安裝其他php相關的軟體也是這樣,由於配置工作不能繼續,真的無法解決了,來請教一下這裡的大神

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak //現將info檔案夾更名
sudo mkdir /var/lib/dpkg/info //再建立一個新的info檔案夾
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install php7.0-fpm
sudo apt-get install php7.0
sudo mv /var/lib/dpkg/info.bak /var/lib/dpkg/info

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.