I'm trying to install php-zip but I get a conflict error:
Problem: conflicting requests
- nothing provides libzip(x86-64) >= 1.8.0 needed by php-pecl-zip-1.19.5-1.fc34.remi.8.0.x86_64
- nothing provides libzip(x86-64) >= 1.8.0 needed by php-pecl-zip-1.20.0-1.fc34.remi.8.0.x86_64
This library is available in "remi" repository, which seems to not be enabled.
https://rpms.remirepo.net/fedora/34/remi/x86_64/repoview/libzip.html
No need pear package, just use the below command.
sometime need check os version then use compatible repo
$ dnf install libzip-dev libzip php-zip php-devel -y
$ php -m | grep zip
> zip
Related
I am using Ubuntu 17 with php 7.1 and am trying to install Laravel 5.5 but it is telling me to check the minimum requirements.
I can't install the recommended php extensions. I am using sudo add-apt-repository ppa:ondrej/php but it appears the extension are not there and there is a mismatch from the repo
Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu artful InRelease' changed its 'Label' value from '***** The main PPA for PHP (5.6, 7.0, 7.1) with many PECL extensions *****' to '***** The main PPA for supported PHP versions with many PECL extensions *****'
Your composer should say what extensions you need.
You also check doc https://laravel.com/docs/master#installation
PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext
Install PHP 7.1 on Ubuntu
Use the following set of commands to add PPA for PHP 7 in your Ubuntu system and install it.
> sudo apt-get install python-software-properties
> sudo add-apt-repository ppa:ondrej/php
> sudo apt-get update
> sudo apt-get install -y php7.1
Now use the following command to check installed php version on your system.
> php -v
Install PHP 7 Modules/Extensions
Find all the available PHP 7 modules using the following command:
> sudo apt-cache search php7-*
Install required PHP extensions using the following command
> sudo apt-get install <extension-name>
You can install multiple extensions using the same command. Separate extension names by a space.
For example
> sudo apt-get install php7.1-xml php7.1-xmlrpc php7.1-zip
Laravel 5.5 System Requirements Checker
To verify system requirements for Laravel 5.5 you can then use the following simple app.
https://github.com/mitesh1409/laravel-system-requirements-checker
Do git clone of this repo inside your server's root directory and then execute it.
For example using Apache server on Ubuntu 16.04, do git clone of this repo inside "var/www/html". It will create an app folder named "laravel-system-requirements-checker". Now you can run this using the url "http://localhost/laravel-system-requirements-checker/".
I hope this will help everyone starting development on Laravel 5.5.
Thanks.
Laravel-Requirement-Checker from browser
https://github.com/hosamalzagh/Laravel-Requirement-Checker
I am getting this error, when trying to install Zip for PHP 7:
pecl install zip
yields the error
configure: error: Please reinstall the libzip distribution
I did not find anything related to this error.
I tried apt-get install libzip but the package was not found.
Solved it:
apt-get install libzip-dev
will install the missing libzip-distribution
This might be helpful for webmin/virtualmin users running CentOS 7:
yum install php-pecl-zip
This worked for me.
This worked for me with Amazon Linux:
yum install libzip-devel.x86_64
At the time of this writing, I had to use libzip > = 0.11. The libzip/libzip-devel package on the official
CentOS x86_64 repository is still on 0.10. To get around this, the Psychotic Ninja Plus x86_64 repository offers a 0.11 version. Information for libzip and libzip-devel on the Psychotic Ninja Plus repositories can be found on those links.
To install and use this version, you can run the following commands,
Download latest psychotic-release rpm from
http://packages.psychotic.ninja/7/plus/x86_64/RPMS/
Install psychotic-release rpm:
rpm -Uvh psychotic-release*rpm
Install libzip-devel rpm package:
yum --enablerepo=psychotic-plus install libzip-devel
Since it took me some time and research to figure this out i think it may come handy for mac-users:
You can install libzip through brew using:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
And then:
brew install libzip
I am trying to install memcached in Dockerfile but I keep getting th same error. Everything was working fine but looks like some layers were cached I and the images was being built with no problems at all. But since I cleared the cache I can't build the image. Here is some of it's content:
FROM php:5-apache
RUN apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev
RUN pecl install memcached
RUN echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini
There are many other things that are installed but as I said everything was working before. The error is that memcached requires php7 to run. I dont know if something has changed in the recent builds of the library but looks like it refuses to work with php5. Here is the error:
pecl/memcached requires PHP (version >= 7.0.0), installed version is 5.6.30
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
No valid packages found
install failed
The command '/bin/sh -c pecl install memcached' returned a non-zero code: 1
The PECL memcached package introduced the dependency on PHP 7 in version 3.0.0. You can still install the 2.x version of that package:
FROM php:5-apache
RUN apt-get update && apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev
RUN pecl install memcached-2.2.0
RUN echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini
I'm a newbie in Linux I just installed composer and laravel...
but when i run the laravel new project i get the following error:
[RuntimeException]
The Zip PHP extension is not installed. Please install it and try again.
I don't know how to install that extension...
please help
Try type into the command line:
sudo apt-get install php7.0-zip
Verify from any route with:
dd(get_loaded_extensions());
This worked for me, good luck.
for php 7.0
sudo apt-get install php7.0-zip
for php 7.1
sudo apt-get install php7.1-zip
and so on!
I got the same issue and tried to install the extension with the command sudo apt install php7.0-zip but still got the same error. I finally solved it with sudo apt install php-zip
I was using php7.0-zts.The solution was to uninstall all the ZTS packages and revert to the regular php7.0 packages.
use this sudo apt-get install php-zip
The php version will be sorted out by the system.
This is outdate using brew doctor and brew cleanup. Brew doctor will give you some fixes that will help you install laravel.
composer global require laravel/installer\n && brew install php
installing on CentOS
try yum search zip |grep -i php and install with package name came back
like - sudo yum install ea-php73-php-zip.x86_64
You can use php-zip or php-zip7.x package from apt. Such as:
sudo apt-get install php-zip
Many packages in apt have a default version such as php-zip then explicit version(s). In order to search apt for packages you can always use
apt-cache search keyword
Or in this example specifically either
apt-cache search zip
apt-cache search php-zip
Which will allow you to find the php-zip and php-zip7.4 (at the time of writing this comment) package to install.
Very useful command to when you're trying to satisfy some dependency and cannot find the package name.
I'm trying to install the php_http PHP extension on my CentOS server.
I have done:
yum install php-pear
But get:
No package php-pear available
Yet I can do:
pear
And get a list of commands from Pear.
Same for yum install pecl. I can do pecl but pecl install pecl_http returns:
No releases available for package "pecl.php.net/pecl_http"
install failed
Yet /usr/bin/pecl isn't a directory that exists. Also a sudo pecl install pecl_http returns sudo: pecl: command not found, which I find quite odd.
I'm not entirely sure what's going on here/what I'm doing wrong.
edit: I am using the following repos:
base CentOS-6 - Base
epel Extra Packages for Enterprise Linux 6 - x86_64
extras CentOS-6 - Extras
rpmforge RHEL 6 - RPMforge.net - dag
updates CentOS-6 - Updates
vz-base vz-base
vz-updates vz-updates
On CentOS,
Install PHP Pear if not installed yet:
# yum install php-pear
Install GCC if not installed yet:
# yum install gcc
Install cURL if not installed yet:
# yum install curl-devel
Install following libraries if not installed yet:
# yum install php-devel
# yum install zlib-devel
# yum install pcre-devel
Start the main installation:
# pecl install pecl_http
Add the following line to /etc/php.ini file
extension=raphf.so
extension=propro.so
extension=http.so
Restart apache server so the extension can be loaded
# service httpd restart
You can check if it installed successfully or not:
# pecl list
Step 1) import the REMI repo
CentOS 5
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm;
CentOS 6
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm;
Step 2) install php-pear
yum --enablerepo=remi,remi-php55 install php-pear
Step 3) install pecl_http
pecl install pecl_http
For other people having this problem. I discovered this question while trying to figure out why I was having the same problem. Turned out the default configuration at my hosting provider was to include php* in the exclude directive for yum. Check /etc/yum.conf and make sure that the package you're trying to install isn't matched by an entry in the exclude directive.
if you are running php 7 you might want to try this
yum install php70w-pear
if you get any errors, be sure to uninstall the pear package from any previous attempts
yum remove php-pear
best of luck
If you are using php 5.4.x, IMO best repo to use is iuscommunity. Its very stable and used by Rackspace to do only PHP and a few other packages for CentOS.
rpm -Uhv http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-11.ius.centos6.noarch.rpm
yum install php54-pear
Mind you, the reason why its php54-pear and not php-pear is because 5.3 and 5.4 both are compiled in the repository. Here is the list of php packages -> http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/repoview/development.languages.group.html
I tested this and it works, but I only use EPEL and iuscommunity REPO's. I avoid using rpmforge myself.
Centos 6.5 and php7:
sudo su -
yum install yum-utils
you can get last version of lua : http://pecl.php.net/package/lua
wget http://pecl.php.net/get/lua-2.0.4.tgz
tar -xvzf lua-2.0.4.tgz
cd lua-2.0.4
mkdir /usr/include/lua
mv * /usr/include/lua
yum install gcc
yum install php70w-pearl php70w-devel
yum install curl-devel
yum install zlib-devel
yum install pcre-devel
ln -s /usr/include/lua.h /usr/include/lua/lua.h
rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
yum-config-manager --enable remi-php70
yum update
yum --enablerepo=remi,remi-php70 install php70w-pear
yum install lua-devel lua-static
pecl install lua-2.0.4
Whatever your PHP provider is (IUS, Remi or Webtatic), the pear package and the pecl extensions "should" be available there, without any need to compile it from sources (which is usually discouraged, especially on production)
At least "remi" provides most extensions, see the list
So installation should be as simple as
yum install php-pecl-http
yum install php-pecl-lua
etc
And, don't forget to read the Wizard instructions
I tried almost everything on this list before I finally realized that my WHM/cPanel installation was blocking the yum packages. I have to install all PECL modules (I was stuck trying to install mongodb on this particular occation) through the Home > Software > Module Installers inside WHM (cpanel documentation says that you have to be logged in as root).
After watching a lot of threads and installing pear and all the devtool, I finally solved it installing this extension:
yum install php-pecl-mongo
as I seen in - https://madcoda.com/2012/12/install-mongodb-php-driver-in-centos-6-3/