I have been tried install php in debian 9 but not working to me.
I did this command:
sudo apt-get -y install php7.0 libapache2-mod-php7.0
Error after it:
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:
libapache2-mod-php7.0 : Depends: php7.0-cli but it is not going to be installed
Depends: php7.0-opcache but it is not going to be installed
Depends: libc6 (>= 2.27) but 2.24-11+deb9u3 is to be installed
E: Unable to correct problems, you have held broken packages.
(i tried to install this dependencies but i cant, always it depends to another one)
the /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 NETINST 20180310$
deb http://ftp.br.debian.org/debian/ stretch main
deb-src http://ftp.br.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
# stretch-updates, previously known as 'volatile'
deb http://ftp.br.debian.org/debian/ stretch-updates main
deb-src http://ftp.br.debian.org/debian/ stretch-updates main
deb http://http.us.debian.org/debian/ wheezy main contrib non-free
Anyone can help me?
Thanks advance
It seems you've merged in your apt file wheezy and stretch releases of debian. Try removing the last line of your file :
deb http://http.us.debian.org/debian/ wheezy main contrib non-free
and then try an apt-get update command. Then you could try to install php7.
But be aware that if you're starting from an wheezy install, you must upgrade it to stretch before trying to install php7.0
Related
I am using Debian 9, and I recently upgraded PHP from 5.6 to 7.4. I was hit by the
Class 'SoapClient' not found
error when running an old PHP script, which worked very well under PHP 5.6. The phpinfo() lists "SOAP" module but it doesn't have a dedicated "soap" section with "Soap Client" listed (as mentioned here).
I believe the problem is that I have not installed the php7.4-soap extension, so I run sudo apt-get install php7.4-soap, but I got these errors:
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.4-soap : Depends: php7.4-common (= 7.4.20-1+ubuntu21.04.1+deb.sury.org+1) but 7.4.16-1+0~20210305.42+debian9~1.gbpbbe65e is to be installed
Depends: libc6 (>= 2.33) but 2.24-11+deb9u4 is to be installed
E: Unable to correct problems, you have held broken packages.
I also tried installing php7.4-common manually, but the installation failed with these errors:
php7.4-common : Depends: libc6 (>= 2.33) but 2.24-11+deb9u4 is to be installed
Depends: libffi8ubuntu1 (>= 3.4~20200819) but it is not installable
E: Unable to correct problems, you have held broken packages.
How can I resolve this kind of problem? Thank you.
My output of grep -Rn --include=\*.list ^[^\#] /etc/apt/ is:
/etc/apt/sources.list.d/mysql.list:4:deb http://repo.mysql.com/apt/debian/ stretch mysql-apt-config
/etc/apt/sources.list.d/mysql.list:5:deb http://repo.mysql.com/apt/debian/ stretch mysql-5.6
/etc/apt/sources.list.d/mysql.list:6:deb http://repo.mysql.com/apt/debian/ stretch mysql-tools
/etc/apt/sources.list.d/mysql.list:8:deb-src http://repo.mysql.com/apt/debian/ stretch mysql-5.6
/etc/apt/sources.list.d/dotdeb.list:1:deb http://packages.dotdeb.org wheezy-php56 all
/etc/apt/sources.list.d/dotdeb.list:2:deb-src http://packages.dotdeb.org wheezy-php56 all
/etc/apt/sources.list.d/php.list:1:deb https://packages.sury.org/php/ stretch main
/etc/apt/sources.list:17:deb http://mirrors.linode.com/debian stretch main
/etc/apt/sources.list:18:deb-src http://mirrors.linode.com/debian stretch main
/etc/apt/sources.list:20:deb http://mirrors.linode.com/debian-security/ stretch/updates main
/etc/apt/sources.list:21:deb-src http://mirrors.linode.com/debian-security/ stretch/updates main
/etc/apt/sources.list:24:deb http://mirrors.linode.com/debian stretch-updates main
/etc/apt/sources.list:25:deb-src http://mirrors.linode.com/debian stretch-updates main
On debian the php7.4-soap is available for bullseye and sid.
On debian Stretch, you can install php7.4-soap from Sury repo:
sudo apt install apt-transport-https software-properties-common lsb-release ca-certificates
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" sudo tee /etc/apt/sources.list.d/php.list
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
sudo apt update
sudo apt install php7.4-soap
Is that possible to install php5.6-imagick on Debian 10? I installed debian 10 and moved my old codebase in it, but site not working with php7 so I have figured out how to install php5.6, but when I'm trying to install php5.6-imagick I've got this error:
The following packages have unmet dependencies:
php5.6-imagick : Depends: libmagickcore-6.q16-3 (>= 8:6.9.6.8) but it is not installable
Depends: libmagickwand-6.q16-3 (>= 8:6.9.6.8) but it is not installable
Recommends: ghostscript but it is not going to be installed
Recommends: ttf-dejavu-core but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Output of this: grep -Rn --include=\*.list ^[^\#] /etc/apt/
/etc/apt/sources.list.d/php.list:1:deb https://packages.sury.org/php/ stretch main
/etc/apt/sources.list.d/ondrej-ubuntu-php-hirsute.list:1:deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main
/etc/apt/sources.list:7:deb http://deb.debian.org/debian/ buster main
/etc/apt/sources.list:8:deb-src http://deb.debian.org/debian/ buster main
/etc/apt/sources.list:10:deb http://security.debian.org/debian-security buster/updates main
/etc/apt/sources.list:11:deb-src http://security.debian.org/debian-security buster/updates main
/etc/apt/sources.list:14:deb http://deb.debian.org/debian/ buster-updates main
/etc/apt/sources.list:15:deb-src http://deb.debian.org/debian/ buster-updates main
Remove ondrej-ubuntu-php-hirsute.list it is for Ubuntu hirsute:
sudo rm /etc/apt/sources.list.d/ondrej-ubuntu-php-hirsute.list
Use buster codename instead of stretch in Sury repository:
sudo sed -i 's/stretch/buster/' /etc/apt/sources.list.d/php.list
Then run :
sudo apt update
sudo apt install php5.6-imagick
This is the error that is displayed when trying to install.
root#BH13:# apt-get install php5-gd
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:
php5-gd : Depends: libt1-5 (>= 5.1.0) but it is not installable
Depends: libvpx1 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
php version.
root#BH13:# php -v
PHP 5.5.38-1~dotdeb+7.1 (cli) (built: Jul 21 2016 18:33:48)
It does not let me install php5-gd to use the php image libraries.
This is in sources.list
deb http://http.debian.net/debian/ squeeze-lts main contrib non-free
deb http://packages.dotdeb.org wheezy-php55 all
deb-src http://packages.dotdeb.org wheezy-php55 all
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all
deb http://packages.dotdeb.org squeeze all
This was the version of php that I had before updating:
PHP Version 5.4.45-0+deb7u9
and previous sources.list
deb http://ftp.nl.debian.org/debian/ wheezy main
deb-src http://ftp.nl.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib
Thanks for the support.
I am running into some issues installing the PHP zip archive and not sure how to fix this. I am running Ubuntu 18 with PHP 7.2
The error I receive in terminal is
The following packages have unmet dependencies.
php7.2-zip : Depends: php7.2-common (= 7.2.5-0ubuntu0.18.04.1) but 7.2.5-
1+ubuntu17.10.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
Any help would be appreciated, thanks
I tried changing the repository list with:
http://security.ubuntu.com/ubuntu bionic-security main universe
http://archive.ubuntu.com/ubuntu bionic main restricted universe
But none of them seem to work, but I finally found a repository that works running the following command
add-apt-repository ppa:ondrej/php
And then updating and installing normally the package using apt-get
php7.2-zip Installed
As you can see its installed at last.
On Ubuntu 18.04, this can happen if your missing the "security.ubuntu.com/ubuntu bionic-security main universe" repo.
Add it to your /etc/apt/sources.list, update and then it will install normally.
echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe" >>
/etc/apt/sources.list
apt update
apt install php7.2-zip
When I try to install php5-fpm I get the following error:
sudo apt-get install php5-fpm
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:
php5-fpm : Depends: libssl1.0.0 (>= 1.0.0) but it is not going to be installed
Depends: php5-common (= 5.4.39-0+deb7u2) but it is not going to be installed
Depends: ucf but it is not going to be installed
Depends: tzdata but it is not going to be installed
PreDepends: dpkg (>= 1.16.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How can I solve this problem?
My /etc/apt/sources.list
deb http://ftp.at.debian.org/debian/ wheezy main
deb-src http://ftp.at.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
# wheezy-updates, previously known as 'volatile'
deb http://ftp.at.debian.org/debian/ wheezy-updates main
deb-src http://ftp.at.debian.org/debian/ wheezy-updates main
deb http://http.us.debian.org/debian wheezy contrib non-free main
deb http://pkg.jenkins-ci.org/debian binary/
deb http://ftp.ie.debian.org/debian/ testing main
# Just added following https://www.linode.com/docs/websites/apache/running-fastcgi-php-fpm-on-debian-7-with-apache
deb http://ftp.es.debian.org/debian stable main contrib non-free
deb-src http://ftp.es.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
~