在ubuntu 16上安装php 7

时间:2018-04-22 21:22:16

标签: php ubuntu

我尝试在我的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 -yphp7.0

如何修复错误并修复错误,以便php 7安装Ubuntu 16

1 个答案:

答案 0 :(得分:2)

命令行告诉您在哪里查看:

/etc/environment

您可以查看.find文件中是否有错误吗?