Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need help while updating composer

I am getting the following error, Can anybody describe? I am using Laravel 4 and composer as a dependency manager. I tried several time to do this, searched on various forums and got nothing to solve this. I would appreciate if anyone could look into this problem and suggest solution.

Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel v1.3.7 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel 1.3.2 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.0 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.1 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.3 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.4 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.5 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.6 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.7 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- phpoffice/phpexcel 1.8.0 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension xml is missing from your system.

- Installation request for maatwebsite/excel ~1.3 -> satisfiable by maatwebsite/excel[1.3.2, v1.3.0, v1.3.1, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php.ini
    - /etc/php.d/20-bz2.ini
    - /etc/php.d/20-calendar.ini
    - /etc/php.d/20-ctype.ini
    - /etc/php.d/20-curl.ini
    - /etc/php.d/20-exif.ini
    - /etc/php.d/20-fileinfo.ini
    - /etc/php.d/20-ftp.ini
    - /etc/php.d/20-gettext.ini
    - /etc/php.d/20-iconv.ini
    - /etc/php.d/20-mcrypt.ini
    - /etc/php.d/20-mysqlnd.ini
    - /etc/php.d/20-pdo.ini
    - /etc/php.d/20-phar.ini
    - /etc/php.d/20-sockets.ini
    - /etc/php.d/20-sqlite3.ini
    - /etc/php.d/20-tokenizer.ini
    - /etc/php.d/30-mysql.ini
    - /etc/php.d/30-mysqli.ini
    - /etc/php.d/30-pdo_mysql.ini
    - /etc/php.d/30-pdo_sqlite.ini
    - /etc/php.d/40-json.ini
    - /etc/php.d/40-zip.ini

This question is old and i was new to stackoverflow. I posted this in really wrong format and that't why i got -1 in repute. This issue is resolved and i am editing this just to format this question well and to increase readability.

like image 444
Nasir Ahmad Avatar asked Jun 01 '26 17:06

Nasir Ahmad


2 Answers

As the error states: the requested PHP extension xml is missing from your system

The PHP-XML extension is not installed or disabled on your host. You will need to enable or install the extension before you can use the packages that require it.

If it is installed enable the extension in your php.ini file. If it is not installed, install the extension as needed for your OS.

For Ubuntu to install this extension you need to run sudo apt-get install php-xml, for other OS you'll need to Google how to install.

like image 137
stephangroen Avatar answered Jun 03 '26 19:06

stephangroen


In my case php-xml was already installed.

root@shashank-dbserver /# apt-get install php-xml
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-xml is already the newest version.
php-xml set to manually installed.

So, I had to install php5.6-xml instead & my error was gone.

root@shashank-dbserver /# apt-get install php5.6-xml
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  zlib1g-dev
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  php5.6-xml

After this, composer update command ran just fine.

like image 20
Shashank Srivastava Avatar answered Jun 03 '26 19:06

Shashank Srivastava