as the title already explains I need to install the zip module from php 7.1 under Ubuntu 18.04. When every I use the command
sudo apt-get install php7.1-zip
and the follwing output.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.1-zip : Depends: libzip4 (>= 1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
Trying to Install libzip4 does not work either.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libzip4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libzip4' has no installation candidate
Can somebody please try to help. Google does not help with unfortunately either.
Elias
Use the official repository:
sudo add-apt-repository universe
sudo apt update
then:
sudo apt install php7.1-zip
A temporary solution is to just download the package file from trusted source like:
https://packages.ubuntu.com/xenial/libzip4
Afterwards, install it with
dpkg -i libzip4_1.0.1-0ubuntu1_amd64.deb
And the php7.1-zip will install gracefully.
Please try with the following:
if you are using 64-bit then do:
sudo apt-get purge libzip4
then:
sudo apt-get install php7.1-zip
if you are using 32-bit system then:
sudo apt-get install php7.1-zip:i386
Related
For your reference, please:
OS: Ubuntu 16.04
PHP: PHP 7.2.34
NGIX: nginx/1.10.3 (Ubuntu)
I'm having a problem installing php curl. I already tried commands I found online but still, no luck.
Any help would be appreciated. Thank you in advance :)
I already tried these commands:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.2-curl
But I always have this result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.2-curl
E: Couldn't find any package by glob 'php7.2-curl'
E: Couldn't find any package by regex 'php7.2-curl'
When I try this command:
sudo apt-get update
sudo apt install php-curl
This is the result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php-curl : Depends: php7.0-curl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I want to install gd extension in my current php-project(php version is 7.2.34) for that i use this command sudo apt-get install php7.2-gd it's throwing following error and it's not showing in the list when i run php -m command ,How to install gd extension please help me to fix this issue..
Error
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2-gd : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
This package depends on libjpeg62-turbo so you need to install it first
wget http://ftp.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
sudo apt-get install ./libjpeg62-turbo_1.5.1-2_amd64.deb
after that, you could install your package easily
sudo apt-get install php7.2-gd
/etc/init.d/mysql status is running active
When I am trying to install php, I get this message:
sudo apt-get install php5.6-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5.6-mysql
E: Couldn't find any package by glob 'php5.6-mysql'
E: Couldn't find any package by regex 'php5.6-mysql'
To find out what packages exist in the repositories:
sudo apt search <package_name>
This will give you a list of packages that you can install, and this will allow you to check if the package php5.6-mysql actually exists (which it probably doesn't).
Once you've done that, you'll be able to install the correct package that you need!
The packages you probably want are php5-mysql and mysql-server.
So simply run:
sudo apt install php5-mysql mysql-server
I want to install php7 or 7.1 in Ubuntu but i can't
I try with this code :
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
and this is result :
sudo: unable to resolve host myvps
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.1
E: Couldn't find any package by regex 'php7.1'
Also for PHP 7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by regex 'php7.0'
But i know i can install php5 but i don't want !
se result of this commend php -v
root#myvps:~# php -v
The program 'php' is currently not installed. You can install it by typing:
apt-get install php5-cli
and here is my ubuntu information :
root#myvps:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid
whats wrong ? is it possible to solve this problem ?
All code is correct however we need to attention to Kernel release end of life it is so important !
My problem is from here !
and for solve that we have 2 option :
first upgrade Kernel release (recommended)
second use from this hack (at your own risk)
Try without adding any repositories.
sudo apt-get install php7.0
I am following this tutorial to enable thread safety in php 5.6.
https://blog.bensoer.com/compile-thread-safe-php-5-6-20-from-source/
But when i am executing sudo apt-get install -y php5-dev It gives me the following output.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5-dev' has no installation candidate
How can I resolve this in Ubuntu 16.04?
sudo apt-get install -y php5.6-dev did the trick