我最近升级到了 php 5.4 但是它对我来说不起作用所以我想我应该删除 php 5.4 并重新安装 php 5.3。
我卸载了 php5.4,从 sources.list 文件中删除了 dotdeb 源,运行apt-get update
,重新安装了 php5,但它仍然从 dotdeb 安装了 php 5.4,而不是使用原始的 debian 存储库。
dpkg -l | grep php
返回结果如下
# dpkg -l | grep php
ii libapache2-mod-php5 5.4.4-15 server-side , HTML-embedded scripting language (Apache 2 module)
rc libapache2-mod-php5filter 5.4.16-1~dotdeb.0 server-side , HTML-embedded scripting language (apache 2 filter module)
rc libapache2-mod-suphp 0.7.1-1 Apache2 mod ule to run php scripts with the owner permissions
rc php-pear 5.3.3-7+squeeze15 PEAR - PHP Extension and Application Repository
ii php5 5.4.4-15 server-side , HTML-embedded scripting language (metapackage)
rc php5-cgi 5.4.16-1~dotdeb.0 server-side , HTML-embedded scripting language (CGI binary)
ii php5-cli 5.4.4-15 command-lin e interpreter for the php5 scripting language
ii php5-common 5.4.4-15 Common file s for packages built from the php5 source
rc php5-curl 5.4.16-1~dotdeb.0 CURL module for php5
rc php5-gd 5.4.16-1~dotdeb.0 GD module f or php5
rc php5-imagick 5.4.16-1~dotdeb.0 imagick mod ule for php5
rc php5-imap 5.4.16-1~dotdeb.0 IMAP module for php5
rc php5-intl 5.4.16-1~dotdeb.0 internation alisation module for php5
rc php5-mcrypt 5.4.16-1~dotdeb.0 MCrypt modu le for php5
rc php5-mysql 5.4.16-1~dotdeb.0 MySQL modul e for php5
rc php5-mysqlnd 5.4.16-1~dotdeb.0 MySQL modul e for php5 (Native Driver)
rc php5-pgsql 5.4.16-1~dotdeb.0 PostgreSQL module for php5
rc php5-pspell 5.4.16-1~dotdeb.0 pspell modu le for php5
rc phpmyadmin 4:3.4.11.1-2 MySQL web a dministration tool
rc suphp-common 0.7.1-1 Common file s for mod suphp
答案1
“rc” 表示配置文件存在。输入apt-get remove php5 --purge
以完全删除它,然后从官方安装。