-1

When I run composer install in the root of my project folder i get the following output:

 diorcula  ~  Documents  WORK  pointbreak-develop  composer install
> curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar --create-dirs -o bin/wp-cli.phar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5951k  100 5951k    0     0  8478k      0 --:--:-- --:--:-- --:--:-- 8466k
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

> php bin/wp-cli.phar core download --locale=en_AU --skip-content --force
Downloading WordPress 5.8 (en_AU)...
Error: Extracting a zip file requires ZipArchive.
Script php bin/wp-cli.phar core download --locale=en_AU --skip-content --force handling the post-install-cmd event returned with error code 1

Some more information:

  • PHP version: 7.4.16
  • WP-CLI version 2.5.0
  • Pop!_OS version 21.04 (Debian based distro)
Diorcula
  • 105
  • 2
  • 12
  • 1
    You missing the PHP-extension `ZipArchive` - like the error shows. Does [this](https://stackoverflow.com/questions/49583881/how-can-i-install-ziparchive-on-php-7-2-with-centos-7) fix your problem? – wayneOS Jul 26 '21 at 10:02
  • Hi there @wayneOS which answer do you mean exactly? (i read through them but not sure which specific to try) also I'm first going to try if installing apache again will fix it – Diorcula Jul 26 '21 at 10:06
  • 1
    _"I'm first going to try if installing apache again will fix it"_ - `composer install` has nothing to do with Apache. Install the zip extension for PHP instead. Try with `sudo apt-get install php-zip` – M. Eriksson Jul 26 '21 at 10:10
  • 1
    @Diorcula sorry i meant to be more precise. you need to install the extesion with either `sudo yum install php-pecl-zip` or `sudo yum install php-zip`. It could also be `apt-get` instead `yum`. I don't know Pop!_OS – wayneOS Jul 26 '21 at 10:10

1 Answers1

-1

As users https://stackoverflow.com/users/2453432/magnus-eriksson and https://stackoverflow.com/users/6001936/wayneos answered it had to do with missing the extension and install it using: apt-get install php-zip did the trick!

Diorcula
  • 105
  • 2
  • 12