I'm running php7 on a redhat machine and am getting the following error in laravel:
Class 'ZipArchive' not found
I had this issue on my personal virtual machine server and all I had to do was run:
sudo yum install php7.0-zip
On my dev server I tried running the command and I get:
sudo yum install php7.0-zip
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package php7.0-zip available.
Just for more information here is my php version:
php -v
PHP 7.1.12 (cli) (built: Dec  1 2017 13:53:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
Edit: If I run php7.1-zip
sudo yum install php7.1-zip
Loaded plugins: product-id, search-disabled-repos, subscription-manager
epel/x86_64/metalink                                     |  16 kB     00:00     
gitlab_gitlab-ee/x86_64/signature                        |  836 B     00:00     
gitlab_gitlab-ee/x86_64/signature                        | 1.0 kB     00:00 !!! 
gitlab_gitlab-ee-source/signature                        |  836 B     00:00     
gitlab_gitlab-ee-source/signature                        |  951 B     00:00 !!! 
icinga-stable-release                                    | 2.5 kB     00:00     
jenkins                                                  | 2.9 kB     00:00     
plesk-php-5.6                                            | 2.9 kB     00:00     
plesk-php-7.0                                            | 2.9 kB     00:00     
remi-php71                                               | 2.9 kB     00:00     
remi-safe                                                | 2.9 kB     00:00     
(1/2): remi-php71/primary_db                               | 208 kB   00:00     
(2/2): remi-safe/primary_db                                | 1.1 MB   00:01     
No package php7.1-zip available.
Error: Nothing to do
I had the same problem. I was getting:
No package php7.0-zip available. Error: Nothing to do
when running
yum install php7.0-zip
I first searched all yum packages by running:
yum search php70-zip
if returns nothing then run :
yum search php70-php-zip
if returned:
php70-zip.x86_64 : ZIP archive management extension for PHP
Then I installed the package that the search told me was there:
yum install php70-zip.x86_64
The installation worked like a charm. Then I restarted my apache server.
service httpd restart
Now php zip (for php7) is installed!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With