在ubuntu16.04上安裝php7.0提示這個:
<code>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.ini php_invoke: Enable module xmlwriter for apache2 sapi php_invoke: Enable module xml for apache2 sapi php_invoke: Enable module fileinfo for apache2 sapi php_invoke: Enable module shmop for apache2 sapi php_invoke: Enable module calendar for apache2 sapi php_invoke: Enable module sysvsem for apache2 sapi php_invoke: Enable module exif for apache2 sapi php_invoke: Enable module xmlreader for apache2 sapi php_invoke: Enable module json for apache2 sapi php_invoke: Enable module tokenizer for apache2 sapi php_invoke: Enable module simplexml for apache2 sapi php_invoke: Enable module dom for apache2 sapi php_invoke: Enable module posix for apache2 sapi php_invoke: Enable module gettext for apache2 sapi php_invoke: Enable module sysvmsg for apache2 sapi php_invoke: Enable module sysvshm for apache2 sapi php_invoke: Enable module wddx for apache2 sapi php_invoke: Enable module xsl for apache2 sapi php_invoke: Enable module readline for apache2 sapi php_invoke: Enable module ctype for apache2 sapi php_invoke: Enable module phar for apache2 sapi php_invoke: Enable module ftp for apache2 sapi php_invoke: Enable module opcache for apache2 sapi php_invoke: Enable module pdo for apache2 sapi php_invoke: Enable module sockets for apache2 sapi php_invoke: Enable module iconv for apache2 sapi dpkg: 处理软件包 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.ini php_invoke: Enable module xmlwriter for fpm sapi php_invoke: Enable module xml for fpm sapi php_invoke: Enable module fileinfo for fpm sapi php_invoke: Enable module shmop for fpm sapi php_invoke: Enable module calendar for fpm sapi php_invoke: Enable module sysvsem for fpm sapi php_invoke: Enable module exif for fpm sapi php_invoke: Enable module xmlreader for fpm sapi php_invoke: Enable module json for fpm sapi php_invoke: Enable module tokenizer for fpm sapi php_invoke: Enable module simplexml for fpm sapi php_invoke: Enable module dom for fpm sapi php_invoke: Enable module posix for fpm sapi php_invoke: Enable module gettext for fpm sapi php_invoke: Enable module sysvmsg for fpm sapi php_invoke: Enable module sysvshm for fpm sapi php_invoke: Enable module wddx for fpm sapi php_invoke: Enable module xsl for fpm sapi php_invoke: Enable module readline for fpm sapi php_invoke: Enable module ctype for fpm sapi php_invoke: Enable module phar for fpm sapi php_invoke: Enable module ftp for fpm sapi php_invoke: Enable module opcache for fpm sapi php_invoke: Enable module pdo for fpm sapi php_invoke: Enable module sockets for fpm sapi php_invoke: Enable module iconv for fpm sapi NOTICE: Not enabling PHP 7.0 FPM by default. NOTICE: To enable PHP 7.0 FPM in Apache2 do: NOTICE: a2enmod proxy_fcgi setenvif NOTICE: a2enconf php7.0-fpm NOTICE: 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 overrides insserv: 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 脚本 返回错误状态 1 dpkg: 依赖关系问题使得 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.0 E: Sub-process /usr/bin/dpkg returned an error code (1) pcd@pcd-All-Series:~/桌面$ </code>
在這種情況下,我安裝其他php相關的軟體也是這樣,由於設定工作不能繼續,真的無法解決了,來請教一下這裡的大神
回覆內容:
在ubuntu16.04上安裝php7.0提示這個:
<code>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.ini php_invoke: Enable module xmlwriter for apache2 sapi php_invoke: Enable module xml for apache2 sapi php_invoke: Enable module fileinfo for apache2 sapi php_invoke: Enable module shmop for apache2 sapi php_invoke: Enable module calendar for apache2 sapi php_invoke: Enable module sysvsem for apache2 sapi php_invoke: Enable module exif for apache2 sapi php_invoke: Enable module xmlreader for apache2 sapi php_invoke: Enable module json for apache2 sapi php_invoke: Enable module tokenizer for apache2 sapi php_invoke: Enable module simplexml for apache2 sapi php_invoke: Enable module dom for apache2 sapi php_invoke: Enable module posix for apache2 sapi php_invoke: Enable module gettext for apache2 sapi php_invoke: Enable module sysvmsg for apache2 sapi php_invoke: Enable module sysvshm for apache2 sapi php_invoke: Enable module wddx for apache2 sapi php_invoke: Enable module xsl for apache2 sapi php_invoke: Enable module readline for apache2 sapi php_invoke: Enable module ctype for apache2 sapi php_invoke: Enable module phar for apache2 sapi php_invoke: Enable module ftp for apache2 sapi php_invoke: Enable module opcache for apache2 sapi php_invoke: Enable module pdo for apache2 sapi php_invoke: Enable module sockets for apache2 sapi php_invoke: Enable module iconv for apache2 sapi dpkg: 处理软件包 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.ini php_invoke: Enable module xmlwriter for fpm sapi php_invoke: Enable module xml for fpm sapi php_invoke: Enable module fileinfo for fpm sapi php_invoke: Enable module shmop for fpm sapi php_invoke: Enable module calendar for fpm sapi php_invoke: Enable module sysvsem for fpm sapi php_invoke: Enable module exif for fpm sapi php_invoke: Enable module xmlreader for fpm sapi php_invoke: Enable module json for fpm sapi php_invoke: Enable module tokenizer for fpm sapi php_invoke: Enable module simplexml for fpm sapi php_invoke: Enable module dom for fpm sapi php_invoke: Enable module posix for fpm sapi php_invoke: Enable module gettext for fpm sapi php_invoke: Enable module sysvmsg for fpm sapi php_invoke: Enable module sysvshm for fpm sapi php_invoke: Enable module wddx for fpm sapi php_invoke: Enable module xsl for fpm sapi php_invoke: Enable module readline for fpm sapi php_invoke: Enable module ctype for fpm sapi php_invoke: Enable module phar for fpm sapi php_invoke: Enable module ftp for fpm sapi php_invoke: Enable module opcache for fpm sapi php_invoke: Enable module pdo for fpm sapi php_invoke: Enable module sockets for fpm sapi php_invoke: Enable module iconv for fpm sapi NOTICE: Not enabling PHP 7.0 FPM by default. NOTICE: To enable PHP 7.0 FPM in Apache2 do: NOTICE: a2enmod proxy_fcgi setenvif NOTICE: a2enconf php7.0-fpm NOTICE: 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 overrides insserv: 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 脚本 返回错误状态 1 dpkg: 依赖关系问题使得 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.0 E: Sub-process /usr/bin/dpkg returned an error code (1) pcd@pcd-All-Series:~/桌面$ </code>
在這種情況下,我安裝其他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

本文討論了PHP中的crypt()和password_hash()的差異,以進行密碼哈希,重點介紹其實施,安全性和對現代Web應用程序的適用性。

文章討論了通過輸入驗證,輸出編碼以及使用OWASP ESAPI和HTML淨化器之類的工具來防止PHP中的跨站點腳本(XSS)。

自動加載PHP會在需要時自動加載類文件,從而通過減少內存使用和增強代碼組織來提高性能。最佳實踐包括使用PSR-4和有效組織代碼。

本文討論了在PHP中管理文件上傳大小的管理,重點是2MB的默認限制以及如何通過修改PHP.INI設置來增加它。

本文討論了PHP 7.1中引入的PHP中的無效類型,允許變量或參數為指定類型或NULL。它突出顯示了諸如提高可讀性,類型安全性和明確意圖的好處,並解釋瞭如何聲明

本文討論了unset()和unlink()功能在編程中的差異,重點關注其目的和用例。 unset()從內存中刪除變量,而unlink()從文件系統中刪除文件。兩者都對效率至關重要


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SublimeText3漢化版
中文版,非常好用

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

WebStorm Mac版
好用的JavaScript開發工具

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具