简体   繁体   English

如何完全卸载 PHP 7? (卡利 Linux/Debian)

[英]How to uninstall PHP 7 completely? (Kali Linux/Debian)

On my distribution of kali (2016.2) there was a php package v7.0.11 preinstalled.在我的 kali (2016.2) 发行版中,预装了 php package v7.0.11。 I'd like to use version 5.6 instead.我想改用 5.6 版。 Could anyone guide me through on how to remove it?谁能指导我如何删除它? I've already tried, looking for some guides online, but php7 is still pretty fresh, so there are not too many threads about it, especially while using kali.我已经试过了,在网上找了一些指南,但是php7还是很新鲜的,所以没有太多关于它的线程,尤其是在使用kali的时候。 Nevertheless, I found some clues but I didn't manage to do it properly, apparently.尽管如此,我还是找到了一些线索,但显然我没有正确地做到这一点。 A lot of mess with dependencies, and overall, my whole kali install is now broken.依赖关系有很多混乱,总的来说,我的整个 kali 安装现在都坏了。

After purging php7, I'd like to install php 5.6, is there an easy way to do it with apt?清除 php7 后,我想安装 php 5.6,有没有简单的方法可以用 apt 来完成?

Thanks in advance.提前致谢。 Matthew马修

I installed php 5.6 following this tutorial : http://www.drupal8.ovh/en/tutoriels/178/how-to-install-php-on-linux 我按照本教程安装了php 5.6: http//www.drupal8.ovh/en/tutoriels/178/how-to-install-php-on-linux

To remove php 7, you can try: 要删除php 7,您可以尝试:

sudo apt-get purge php7.0-common

这将删除所有php7版本,无论是php 7.0还是php 7.1等。

sudo apt-get purge php7.*

I prefer to use php apt remove php7.0* This will remove php7 and related packages.我更喜欢使用php apt remove php7.0*这将删除 php7 和相关包。 It will also downgrade the version to the subsequent (lower) php version.它还会将版本降级到后续(较低)的 php 版本。

I prefer to use我更喜欢使用

sudo apt-get purge php7.*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM