在 Ubuntu 14.04 上卸载 PHP 7.1

在 Ubuntu 14.04 上卸载 PHP 7.1

我在操作系统 Ubuntu 14.04 上安装 php7.1 时遇到了一些麻烦

因此我从以下网址下载了 php-7.1.11.tar.gz (sig) [18, 995Kb] 版本:http://php.net/downloads.php

我按照以下说明进行安装:

tar -xzf archive-name.tar.gz
cd archive-name
./configure
make
sudo make install

现在我想删除它,但我不知道该怎么做。

我跑了:

php apt-get purge php7.*

但是如果我运行php -v,我仍然会得到:

PHP 7.1.11 (cli) (built: Nov 17 2017 11:35:49) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

如果我运行 PHP --ini,我会得到

Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

我进入了/usr/local/lib,什么也没看到。我甚至透露了隐藏文件


更新

我跑了locate php7.1,得到了:

locate php7.1
/var/cache/apt/archives/libapache2-mod-php7.1_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-bz2_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-cli_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-common_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-curl_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-gmp_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-intl_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-json_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-mbstring_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-mcrypt_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-mysql_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-opcache_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-readline_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-sqlite3_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-tidy_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-xml_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1-zip_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_amd64.deb
/var/cache/apt/archives/php7.1_7.1.11-1+0~20171027135825.10+jessie~1.gbp2e638d_all.deb
/var/log/php7.1-fpm.log
/var/log/upstart/php7.1-fpm.log.1.gz
/var/log/upstart/php7.1-fpm.log.2.gz
/var/log/upstart/php7.1-fpm.log.3.gz
/var/log/upstart/php7.1-fpm.log.4.gz
/var/log/upstart/php7.1-fpm.log.5.gz
/var/log/upstart/php7.1-fpm.log.6.gz
/var/log/upstart/php7.1-fpm.log.7.gz

答案1

如果作者没有为其提供目标,则无法删除已编译的二进制文件make uninstall。如果编译的二进制文件恰好位于单个目录中,/usr/local/php7.1则可以删除整个目录。要获取运行 php 命令的目录,请键入,如果它是符号链接,请按照该链接转到运行 php 命令的目录。您很可能会在该目录中找到命令ls -l $(which php)安装的部分或全部文件。make install

相关内容