Trouble installing php 7 on Ubuntu 14.04

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm using Ubuntu 14.04 and I'm trying to install PHP 7. I'm doing something wrong. I followed these directions.

If I type 'php -v' in terminal it shows php 7.

However, if I look at my phpinfo() the output still shows my old php 5.

Now when I try to install something that requires php 7 I get the following error:

    Your requirements could not be resolved to an installable set of packages.

        Problem 1
          - Installation request for alchemy/zippy 0.3.5 -> satisfiable by 
alchemy/zippy[0.3.5].
          - alchemy/zippy 0.3.5 requires ext-mbstring * -> the requested PHP 
extension mbstring is missing from your system.
        Problem 2
          - Installation request for easyrdf/easyrdf 0.9.1 -> satisfiable by 
easyrdf/easyrdf[0.9.1].
          - easyrdf/easyrdf 0.9.1 requires ext-mbstring * -> the requested 
PHP extension mbstring is missing from your system.
        Problem 3
          - Installation request for phpunit/phpunit 4.8.27 -> satisfiable by
 phpunit/phpunit[4.8.27].
          - phpunit/phpunit 4.8.27 requires ext-dom * -> the requested PHP 
extension dom is missing from your system.
        Problem 4
          - alchemy/zippy 0.3.5 requires ext-mbstring * -> the requested PHP 
extension mbstring is missing from your system.
          - drupal/console 0.11.3 requires alchemy/zippy 0.3.5 -> satisfiable
 by alchemy/zippy[0.3.5].
          - Installation request for drupal/console 0.11.3 -> satisfiable by 
drupal/console[0.11.3].

        To enable extensions, verify that they are enabled in those .ini 
files:
          - /etc/php/7.0/cli/php.ini
          - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
          - /etc/php/7.0/cli/conf.d/10-opcache.ini
          - /etc/php/7.0/cli/conf.d/10-pdo.ini
          - /etc/php/7.0/cli/conf.d/20-calendar.ini
          - /etc/php/7.0/cli/conf.d/20-ctype.ini
          - /etc/php/7.0/cli/conf.d/20-exif.ini
          - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
          - /etc/php/7.0/cli/conf.d/20-ftp.ini
          - /etc/php/7.0/cli/conf.d/20-gd.ini
          - /etc/php/7.0/cli/conf.d/20-gettext.ini
          - /etc/php/7.0/cli/conf.d/20-iconv.ini
          - /etc/php/7.0/cli/conf.d/20-json.ini
          - /etc/php/7.0/cli/conf.d/20-mysqli.ini
          - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
          - /etc/php/7.0/cli/conf.d/20-phar.ini
          - /etc/php/7.0/cli/conf.d/20-posix.ini
          - /etc/php/7.0/cli/conf.d/20-readline.ini
          - /etc/php/7.0/cli/conf.d/20-shmop.ini
          - /etc/php/7.0/cli/conf.d/20-sockets.ini
          - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
          - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
          - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
          - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
        You can also run `php --ini` inside terminal to see which files are
 used by PHP in CLI mode.

Anyone have any idea what I need to fix to run php 7 on my system?

profilepic.png
manpreet 2 years ago

The error output you have pasted says it all - you are missing mbstring and dom extensions. Those can be installed using:

sudo apt-get install php7.0-dom php7.0-mbstring

The packages with PHP extensions have correct Provides: field, so right packages will be chosen.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.