Something really messed up happened to my pi2 after the latest update (no idea when it was).
It has replace libcurl3 with libcurl4 and now a php5.6 server that i was running with lighttpd isnt working properly anymore.
I have a pretty old php script for accounting and i was hosting it on pi because it was convinient since it was running 24/7. Mostly i need CURL running which isnt anymore.
The following packages have unmet dependencies:
php5-curl : Depends: libcurl3 (>= 7.18.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Trying to install it via aptitude gives:
Need to get 259 kB of archives. After unpacking 562 kB will be used.
The following packages have unmet dependencies:
libcurl4 : Conflicts: libcurl3 but 7.38.0-4+deb8u16 is to be installed
The following actions will resolve these dependencies:
Remove the following packages:
1) apache2-bin [2.4.38-3+deb10u4 (now, stable)]
2) armv7-network-osmc [1.7.9 (<NULL>, now)]
3) armv7-transmission-app-osmc [2.9.4-5 (<NULL>, now)]
4) curl [7.64.0-4+deb10u1 (now, stable)]
5) libapache2-mod-php7.0 [7.0.33-0+deb9u10 (now)]
6) libapache2-mod-php7.3 [7.3.19-1~deb10u1 (now, stable)]
7) libcurl4 [7.64.0-4+deb10u1 (now, stable)]
8) php [2:7.3+69 (now, stable)]
9) php-curl [2:7.3+69 (now, stable)]
10) php7.3 [7.3.19-1~deb10u1 (now, stable)]
11) php7.3-curl [7.3.19-1~deb10u1 (now, stable)]
12) rbp2-device-osmc [1.5.4 (<NULL>, now)]
13) rbp2-mediacenter-osmc [18.8.0-3 (<NULL>, now)]
which grabs osmc as well which is a no no.
Is there a way i can keep both libraries ? Or does anyone know what to do in this situation ?
Thanks
libcurl3 was part of Debian Stretch and libcurl4 came as part of the update to Debian Buster. lighttpd should have also updated, along with any dependencies. Without logs it’s difficult to say more.
What kind of logs should i provide? I mean the lib file is just gone. PHP gives just a simple error:
Call to undefined function curl_init() in blah blah
and when i try to get the curl lib again with : apt-get install php5-curl i get the above error.
@jb2cool it is impossible to upgrade that script…I have tried…there so many files in it…it is just impossible. @dillthedog, Any idea how to go about updating lighttpd manually? I tried to update it based on some ubuntu pages but i get nothing:
root@pi2:# apt-get install lighttpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
lighttpd is already the newest version (1.4.53-4+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
osmc@osmc:~$ sudo apt-get install php5-curl --dry-run
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-curl 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-curl' has no installation candidate
I’ve tried a few workarounds and had a search on the Internet but haven’t found an easy way to square this particular circle, while keeping a working system.
I’ll see if I can find a better workaround but, as things stand, your best bet is to fix the script or, if that’s not possible, move the accounting system to a separate machine, eg a Pi Zero.
Its ok @dillthedog, thank you so much for trying man. I’ll bite the bullet and try to convert the script to php7. Too many deprecated stuff to fix but i guess now that we are quarantined…what else is there to do
hmmm interesting, thanks @fzinken, we are getting somewhere now. I tried both mysql-server and mysql-server-5.6 but it cant be installed.
root@pi2:~# apt-get install mysql-server-5.6 mysql-client-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-client-5.6 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
However the following packages replace it:
mariadb-client-10.1 mariadb-server-core-10.3 mariadb-server-core-10.0 mariadb-client-10.3 mariadb-client-10.0
Package mysql-server-5.6 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
However the following packages replace it:
mariadb-server-10.1 mariadb-server-10.3 mariadb-server-10.0
E: Package 'mysql-server-5.6' has no installation candidate
E: Package 'mysql-client-5.6' has no installation candidate
but i guess i can install maria instead ?
root@pi2:~# sudo apt install mariadb-server php-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
galera-3 mariadb-server-10.3 mariadb-server-core-10.3 php-common php7.3-common php7.3-mysql rsync socat
Suggested packages:
mailx mariadb-test netcat-openbsd tinyca
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
galera-3 mariadb-server mariadb-server-10.3 mariadb-server-core-10.3 php-common php-mysql php7.3-common php7.3-mysql rsync socat
0 upgraded, 10 newly installed, 0 to remove and 85 not upgraded.
Need to get 11.2 MB of archives.
After this operation, 98.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
I’ve never tried mariadb before…always did it with mysql-server. I’ll give it a go tomorrow then.
Maybe i can skip the format.
Thanks @fzinken!