Ubuntu 16.04多个php版本

时间:2018-01-24 11:01:15

标签: php linux ubuntu-16.04

我的服务器有3个版本的php:5.6,7.0,7.1。

我想知道为什么如果我执行:sudo apt list --installed | grep -i php我看到一些以php开头但没有版本号的包。这个配置是正确的还是我需要卸载php包?

sudo apt list --installed | grep -i php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapache2-mod-php/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
libapache2-mod-php5.6/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
libapache2-mod-php7.0/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
libapache2-mod-php7.1/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php-apcu/now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.1.9+4.0.11-1+ubuntu16.04.1+deb.sury.org+1]
php-apcu-bc/xenial,now 1.0.3-5+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-cgi/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php-common/now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:59+ubuntu16.04.1+deb.sury.org+1]
php-gd/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php-gettext/xenial,now 1.0.11-2+deb.sury.org~xenial+1 all [installed]
php-imagick/xenial,now 3.4.3-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php-mbstring/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php-mcrypt/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+58+ubuntu16.04.1+deb.sury.org+1]
php-memcache/xenial,now 3.0.9~20160311.4991c2f-7+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php-mysql/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php-pear/xenial,now 1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-xml/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:7.2+59+ubuntu16.04.1+deb.sury.org+1]
php5.6/xenial,now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 all [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-cgi/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-cli/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-common/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-curl/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-fpm/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-gd/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-imap/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-json/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-mbstring/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-mcrypt/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-mysql/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-opcache/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-readline/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-tidy/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-xml/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-xmlrpc/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-xsl/xenial,now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 all [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php5.6-zip/now 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1]
php7.0/xenial,now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 all [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-cgi/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-cli/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-common/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-curl/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-gd/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-json/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-mbstring/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-mcrypt/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-mysql/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-opcache/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-readline/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.0-xml/now 7.0.26-2+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.0.27-1+ubuntu16.04.1+deb.sury.org+1]
php7.1/xenial,now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-cgi/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-cli/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-common/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-curl/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-gd/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-imap/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-json/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-mbstring/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-mcrypt/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-mysql/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-opcache/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-readline/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]
php7.1-xml/now 7.1.12-3+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.1.13-1+ubuntu16.04.1+deb.sury.org+1]

1 个答案:

答案 0 :(得分:0)

自Ubuntu 16.04起,PHP的默认版本为7.您看到的没有版本号的软件包是使用Ubuntu默认软件存储库安装的php7软件包。