How to install php 7

I have sầu recently upgraded to lớn Ubuntu 19.10 from 19.04. When I tried to lớn install some package it asked me khổng lồ remove sầu many packages by autoremove sầu. So I run the commvà & it removed the php7.2-fpm.

Bạn đang xem: How to install php 7

Now I am unable to lớn install php7.2-fpm.

$ suvì chưng apt-get install php7.2-fpmReading package lists... DoneBuilding dependency tree Reading state information... DonePackage php7.2-fpm is not available, but is referred khổng lồ by another package.This may mean that the package is missing, has been obsoleted, oris only available from another sourceI tried lớn add ondrej PPA. But still it is not working.

Please help.

Xem thêm: Hướng Dẫn Tạo Sitemap Cho Website Php, Cách Tạo Sitemap Và Khai Báo Với Google

My netbeans also stopped working.


I am now able to use netbeans by installing JDK13. I am still forced lớn use PHP7.3. I am not able to lớn use PHP7.2. Someone asked me to lớn show output of suvì apt-get update. So I am posting it here:

Ubuntu-PC:~$ suvày apt-get update password for xxx: Hit:1 eoan InRelease Hit:2 http://ppage eoan InRelease Hit:3 eoan-updates InRelease Hit:4 eoan-security InRelease Hit:5 http://archive sầ eoan InRelease Hit:6 stable InRelease Hit:7 stable InRelease Ign:8 stable InReleaseHit:9 stable ReleaseReading package lists... Done
Improve sầu this question
edited Oct 29 "19 at 5:15
Future King
asked Oct 28 "19 at 6:46


Future KingFuture King
16111 silver badge44 bronze badges
Add a phản hồi |

2 Answers 2

Active Oldest Votes
You should use the replacement pynhỏ bé package to lớn be able to register ondrej"s PPA

suvày apt install software-properties-commonInstalling the package

Then register the PPA

add-apt-repository ppa:ondrej/phpNow you can install your PHP packages

sudo apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysqlCheông xã your available versions

update-alternatives --các mục php And switch khổng lồ it

suvị update-alternatives --set php /usr/bin/php7.2Everything is working now

Improve this answer
edited Oct 29 "19 at 23:07
answered Oct 29 "19 at 17:49

10133 bronze badges
Add a phản hồi |
suvì apt install software-properties-commonThen register the PPA

add-apt-repository ppa:ondrej/phpmust install additional repository based on webseverfor nginx

add-apt-repository ppa:ondrej/nginx-mainlinefor apache2

add-apt-repository ppa:ondrej/apache2install your PHP packages

suvì apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysqlCheck available versions

update-alternatives --menu php switch lớn php7.2

subởi vì update-alternatives --set php /usr/bin/php7.2
Improve this answer
edited Dec 22 "trăng tròn at 14:14


1,88233 gold badges2121 silver badges3333 bronze badges
answered Dec 10 "20 at 11:24

marc jheriteo sumilangmarc jherico sumilang
Add a comment |

Your Answer

Thanks for contributing an answer to lớn Ask Ubuntu!

Please be sure lớn answer the question. Provide details và tóm tắt your research!

But avoid

Asking for help, clarification, or responding to lớn other answers.Making statements based on opinion; baông xã them up with references or personal experience.

To learn more, see our tips on writing great answers.

Xem thêm: Hướng Dẫn Login Facebook Php Và Mysql, Đăng Nhập Bằng Facebook

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using Thư điện tử & Password

Post as a guest

E-Mail Required, but never shown

Post as a guest

Thư điện tử

Required, but never shown

Post Your Answer Disthẻ

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy và cookie policy

Not the answer you're looking for? Browse other questions tagged php7 or ask your own question.

The Overflow Blog
how to lớn install uploadprogress with php 7.0
How vày I install phpize on Ubuntu 15.10
Attempting lớn install php-zip - getting libzip4 dependancy (>=1.0) error even though I have 1.0.1 installed
Package php7.2-mbstring missing in Ubuntu 18.04
Cannot install PHP7.2-dev on Ubuntu 18 due to unmet dependencies
Making PHP7.2 work under Ubuntu 19.10
Ubuntu 18.04 - Following packages have unmet dependencies: php7.2-fpm: … How to lớn solve this error?
Running Ubuntu 19.10 But phpinfo() shows v19.04
Ubuntu 18.04 with LAMP installed và want to lớn nâng cấp from php7.2 to lớn php7.2-fpm
Hot Network Questions more hot questions

Question feed
Subscribe lớn RSS
Question feed To subscribe lớn this RSS feed, copy và paste this URL into your RSS reader.


Ask Ubuntu
Stachồng Exchange Network
site kiến thiết / logo sản phẩm © 2021 Staông xã Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.9.38752

Ubuntu và Canonical are registered trademarks of Canonical Ltd.
Ask Ubuntu works best with JavaScript enabled

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and discthảm bại information in accordance with our Cookie Policy.

Chuyên mục: