我尝试在我的ubuntu 16中将php版本设置为7,但安装结束时出现错误:
Setting up install-info (6.1.0.dfsg.1-5) ...
/usr/sbin/update-info-dir: 3: /etc/environment: Syntax error: Unterminated quoted string
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)
运行php -v php版本保持不变:
mycomputer@mycomputer:~$ php -v
PHP 5.6.11-1ubuntu3.4 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
我按照以下链接中的说明操作:
https://tecadmin.net/install-php-7-on-ubuntu/
这是:sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej / php sudo apt-get update sudo apt-get install -y php7.0
我该如何处理错误并修复它以在我的Ubuntu 16上安装php 7?
1 回答
命令行告诉你在哪里看:
你能检查一下
/etc/environment
文件是否有错误吗?