Error trying to install PHP 7.2 on Ubuntu

0

I've been trying to install PHP for almost two days, but I can not.

I downloaded the tar.xz package from the official PHP website.

I run tar xJf to unpack, but when it arrives at ./configure the following errors appear:

I have researched both google and Stackoverflow but I could not find any solution to this problem.

    
asked by anonymous 13.03.2018 / 18:45

2 answers

1

Like Valdeir well remember, if your ubuntu is 17.10 or lower follow these steps:

  

Make sure you have the following package installed so you can add repositories:

apt install python-software-properties
  

Add the Ondřej repository

add-apt-repository ppa:ondrej/php
  

That nasty update

apt update

Installing php 7.2:

  

Installing Apache and Zip

apt install -y apache2 zip 
  

Installing PHP and some extensions

apt-get install -y php7.2-mysql php7.2-curl php7.2-json php7.2-cgi php7.2 php7.2-mbstring libapache2-mod-php7.2 php7.2-ldap php-xdebug wget
  

Creating the info.php file

echo "<?php phpinfo() ?>" > /var/www/html/info.php

Remembering: service apache2 start // inicia o serviço do apache

    
13.03.2018 / 19:01
2

Why not use xampp, very practical and comes with everything you need.

link

    
13.03.2018 / 19:49