我尝试在 x64 系统的 ubuntu 14.04 上安装 mongo php 驱动程序。
我使用了本教程当我尝试安装 pecl 来安装 php 驱动程序时,安装结束时出现错误。
sudo apt-get install php5-dev php5-cli php-pear
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-pear is already the newest version.
php5-cli is already the newest version.
php5-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: unexpected EOF while looking for matching `"'
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
install-info
我尝试检查 dpkg 配置,结果如下
xxx:~$ sudo dpkg --configure -a
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: unexpected EOF while looking for matching `"'
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
install-info
即使通过 synaptic 包管理器尝试删除包也不起作用
xxx:~$ sudo apt-get remove --purge php5-dev php5-cli php-pear
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
php5
The following packages will be REMOVED:
php-pear* php5-cli* php5-dev* php5-readline* pkg-php-tools*
The following NEW packages will be installed:
php5
0 upgraded, 1 newly installed, 5 to remove and 85 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,302 B of archives.
After this operation, 15.4 MB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: unexpected EOF while looking for matching `"'
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
install-info
install-info 的内容
#!/bin/sh
#
# Wrapper to the GNU's install-info, to be compatible with the one that used to
# be packaged by dpkg on Debian.
#
# written by Norbert Preining, this is not copyrightable ;-)
#
set -e
if [ -z "$DPKG_RUNNING_VERSION" ] ; then
# it seems we are running from outside a maintainer script, so give a
# warning and call ginstall-info without anything else
echo "This is not dpkg install-info anymore, but GNU install-info" >&2
echo "See the man page for ginstall-info for command line arguments" >&2
ginstall-info "$@"
else
# we are running from a maintainer script, simply ignore the call
# since we have trigger support and people should rebuild their
# package with new debhelper which does not add calls to install-info
# Do not complain if called with "--remove" or "--remove-exactly",
# as these are used in old packages' prerm scripts (see #546165)
while [ -n "$1" ]; do
case "$1" in
--remove|--remove-exactly)
exit 0
;;
*)
shift
;;
esac
done
echo "Ignoring install-info called from maintainer script" >&2
echo "The package $DPKG_MAINTSCRIPT_PACKAGE should be rebuilt with new debhelper to get trigger support" >&2
fi
答案1
你的 /etc/environment 是错误的,你的是:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" JAVA_HOME = ":usr/lib/jvm/java-7-oracle
而它看起来应该是这样的:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-7-oracle"