When trying to execute 'apt-get install php5-curl" following error accurs
The following packages have unmet dependencies:
php5-curl : Depends: php5-common (= 5.6.33+dfsg-0+deb8u1) but 5.6.40+dfsg-0+deb8u8 is to be installed
Any Idea how to fix this?
PHP 5 has been officially unsupported for over a year by now - I think you're going to struggle to resolve dependencies. Even Jessie (the only version still shipping PHP 5 by default, which you seem to be using) becomes unsupported within a few months of now.
Your best long-term plan is to plan your code's upgrade to compatibility with PHP 7.4
Because the security repository is missing / disabled on your `sources.list.
php5-curl is available on the security repository.
You should add the following line to your /etc/apt/sources.list :
deb http://security.debian.org/debian-security jessie/updates main
Then :
sudo apt update
sudo apt upgrade
sudo apt install php5-curl
Related
My worpdress website site health page dispalyas apossible improvement - php module intl missing.
My server has multiple versions of php (8.1 &8.2) active.
I use the following ssh command to install the missing intl module-
apt-get install -y php-intl
But get tis error message.
The following packages have unmet dependencies:
php8.1-intl : Depends: php8.1-common (= 8.1.2-1ubuntu2.10) but 8.1.14-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
the php modules which are active om my server , like imagick, are installed for php8.1. but my active php version is 8.2.
The problem is with the dependencies of the "php8.1-intl" package. Specifically, it requires version 8.1.2-1ubuntu2.10 of the "php8.1-common" package, but the version that is currently available is 8.1.14-1+ubuntu18.04.1+deb.sury.org+1, which is causing a conflict.
try:
sudo apt update
sudo apt-get check
sudo apt-get install -f
sudo dpkg --configure -a
5.sudo apt-get install php8.1-common=8.1.2-1ubuntu2.10
6.sudo apt-get install php8.1-intl
You may need to remove the conflicting package(s) and installing the required packages again. But be careful when removing packages as it may cause other dependencies to break.
2 of my sites are not working bcs I can't install php5-gd library to Debian Wheezy php5.6 ...
I tried
aptitude install php5-gd, and system said i miss 2 dependencies, which i can not find or install...
aptitude install php5-gd
sudo 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.
Have you updated your apt-get first?
First, run:
sudo apt-get update
Then if that is successful run;
sudo apt-get upgrade
if you run
df -lah
first, it may show your /boot is at 100%
Try;
sudo apt-get autoremove
then start from the start, and then try your php5-gd
When that fails
Try :
sudo apt-get install -f
Wheezy is really out of date. It was released in 2013 and its support ended in 2018.
Here's a table imported from the Debian Long Term Support page:
Your best bet is to upgrade to buster (Debian 10, released July 2019 and (probably) supported through 2024.
Another option is to upgrade to jessie (released April 2015, security support ended 2018, community support ends June 2020), which would buy you a few months to replace your system with a newer one.
The final option, if you really need to stay on Wheezy, is to use backports or a carefully-pinned newer release for just the packages in question.
Since Wheezy is so old, there aren't any repositories still being hosted (there's probably an archive of it somewhere, but you won't get updates). I'll walk you through upgrading to Jessie and using its backports instead.
These instructions should work for any release, so you could (should!) use buster in place of jessie, though upgrading across so many releases will almost certainly require quite a bit of work.
1. Update your sources:
$ find /etc/apt/sources.list* -name '*.list' |sudo xargs sed -i 's/wheezy/jessie/g'
2. Add Jessie backports to one of those files if it doesn't yet exist:
deb http://deb.debian.org/debian jessie-backports main
3. Update and upgrade, ideally from outside X11 (e.g. the console at Ctrl+Alt+F2):
$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get autoremove
$ sudo reboot
After that, you can then try to troubleshoot your system.
You should build it manually
From:
https://www.howtoforge.com/building-php-5.4-from-source-on-debian-squeeze
I cannot install php 7.2 on Raspbian.
I used the last Raspbian (Release date : 2017-11-29) with a Debian Stretch 9.1 : https://www.raspberrypi.org/downloads/raspbian/
I followed the instructions from https://www.colinodell.com/blog/2016-12/installing-php-7-1 :
apt-get install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
apt-get update
But when I try
apt-get install -y php7.2
A get the below errors :
root#raspberrypi:/home/pi# apt-get install -y php7.2
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.2 : Depends: libapache2-mod-php7.2 but it is not installable or
php7.2-fpm but it is not installable or
php7.2-cgi but it is not installable
Depends: php7.2-common but it is not installable
E: Unable to correct problems, you have held broken packages.
Someone can help me ?
Thanks a lot
I found the reason, the package php7.1 and php7.2 isn't in the stretch repo :(.
https://raspberrypi.stackexchange.com/questions/70388/how-to-install-php-7-1
Have to wait an update ...
Please check this GitHub issue:
https://github.com/oerdnj/deb.sury.org/issues/579
It seems that Debian packages for newer PHP versions are not yet released for the ARM architecture.
I would like to contribute for building such packages, but there is no activity on the issue after my last post.
An option to install PHP7.1 or newer would be to compile and install it yourself. For some examples, you may want to check http://yoestuve.es/blog/compile-php-7-for-raspberry-pi-with-memcached/. I would also suggest to use checkinstall instead of make install in order to facilitate easier uninstallation later.
Unfortunately it does not look like there will be a higher version than PHP 7.0 for raspberrys with stretch. Here you can see the PHP versions for current and future raspbian releases:
https://packages.debian.org/search?arch=armhf&searchon=names&keywords=php
You will have to upgrade to buster, then you will get PHP 7.3. Here is how:
https://www.raspberrypi.org/blog/buster-the-new-version-of-raspbian/
I've done a ton of searching including here and even after following the suggestions I'm still get the following error.
The following packages have unmet dependencies:
phpmyadmin : Depends: php-gettext but it is not going to be installed
Depends: php-seclib but it is not going to be installed
Any suggestions of how to add php-gettext and php-seclib to PHP7?
Screencapture of error
This isn't a problem with PHP7 or any of the other software you're trying to install, but rather appears to be related to the configuration of your package manager.
It appears to be the output of apt and the question you linked to also is about Ubuntu, so all you have to do is either instruct apt/dpkg/aptitude to install dependencies automatically or install them yourself. Assuming you're using a line like sudo apt-get install php7.0-cli you just need to add the dependencies to it like sudo apt-get install php7.0-cli php-seclib php-gettext.
I am trying to install php5-sqlite on Ubuntu 14.04, but this error occurs:
The following packages have unmet dependencies:
php5-sqlite : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.4) but 5.5.16+dfsg-1+deb.sury.org~precise+2 is to be installed
E: Unable to correct problems, you have held broken packages.
How do I resolve this error? I have upgraded my Ubuntu server from 12.04 to the current 14.04 previously.
I've met the same problem today. There are two ways to resolve it:
use aptitude to help you resolve all the dependency problems,
sudo aptitude install php5-sqlite
if you haven't install aptitude, install it:
sudo apt-get install aptitude
it will give you the option to downgrade the library file to an earlier version
download the proper version of php5-common (and related packages if necessary) from launchpad, use dpkg -i package to install it, then install php5-sqlite.
I highly recommend the second approach.
the accepted answer from #jfly didn't work for me, however, this answer helped resolve the issue by first uninstalling all the old php packages and then reinstalling them.
remove:
sudo apt-get remove php5 php5-common php5-mysql php5-xmlrpc php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear php5-dev php5-imap php5-mcrypt php5-sqlite
install:
sudo apt-get install php5 php5-mysql php-pear php5-gd php5-mcrypt php5-curl php5-sqlite
This means you have one source file not upgraded to the latest repo.
Either use apt-pinning to tell apt which source to prefere or make sure all your sources are up to date. You might need to do both :-)
Please also note that this question is rather off-topic on SO because 1. it doesn't involve programing 2. askubuntu.com is the stackexchange platform for ubuntu questions.