search
HomeBackend DevelopmentPHP7How to install php7.2 on ubuntu (with the process of uninstalling lower versions)

This article is written by the PHP7 tutorial column to introduce to you how to uninstall and install php7.0 when installing the higher version of php7.2 on ubuntu. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

##1. Delete php related packages and configuration

sudo apt-get autoremove php7*
2. Delete the association

sudo find /etc -name "
php" |xargs rm -rf
3 , clear the dept list

sudo apt purge
dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
4. Check Is the uninstallation clean (no return means the uninstallation is complete)

dpkg -l | grep php7.0
Then install the php7.0 version, because php7.0 has been moved from the package management in ubuntu Except, so we need to re-add authorization

add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.0
through the above The command can install the php7.0 version. If it prompts that add-apt-repository does not exist, you can execute the following command

apt-get install software-properties-common
After the above operations, we Just downgraded the php version from php7.2 to php7.0

Personal test and it works

The above is the detailed content of How to install php7.2 on ubuntu (with the process of uninstalling lower versions). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools