I'm on a raspberry pi (which I'm using as my web server for my consulting business) and I'm trying to install package php7.0-dev. However if I have this problem:
sudo apt-get install php7.0-dev
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.0-dev : Depends: libtool (>= 2.4.6-0.1~) but 2.4.2-1.11 is to be installed
Recommends: dh-php but it is not going to be installed
Recommends: pkg-php-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The problem seems to be that libtool is an old version in the repositories for the pi. To get around this I just went and downloaded the source for libtool 2.4.6 and installed it. However if I run the above again I still get the same error.
Is there a way to tell APT to use the libtool I installed for that dependency?
Here's the path for libtool
apt-cache showpkg libtool
Package: libtool
Versions:
2.4.6-2 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_stretch_main_binary-armhf_Packages)
Description Language:
File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages
MD5: 40ea3da4a4ea75419ad95742898b3e52
2.4.2-1.11 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages
MD5: 40ea3da4a4ea75419ad95742898b3e52
Reverse Depends:
dh-autoreconf,libtool 2.4.2
xfce4-dev-tools,libtool
wireshark-dev,libtool
ui-auto,libtool 1.5.8
slapos-node-unofficial,libtool
shtool,libtool
ruby-build,libtool
proftpd-dev,libtool
php7.0-dev,libtool 2.4.6-0.1~
php5-dev,libtool 2.4.6
php5-dev,libtool 2.2
multimedia-devel,libtool
mm-common,libtool
mate-common,libtool
libtool-bin,libtool 2.4.2-1.8~
libtool-bin,libtool 2.4.6-2
liblua5.1-0-dev,libtool
libltdl-dev,libtool 1.5.20
libltdl-dev,libtool 1.5.20
libltdl-dev,libtool
gnome-common,libtool
gcc,libtool
dh-lua,libtool
dh-autoreconf,libtool 2.4.2
autoconf,libtool
anjuta,libtool
xfce4-dev-tools,libtool
wireshark-dev,libtool
ui-auto,libtool 1.5.8
slapos-node-unofficial,libtool
shtool,libtool
ruby-build,libtool
proftpd-dev,libtool
php5-dev,libtool 2.2
php5-dev,libtool 2.2
packaging-dev,libtool
multimedia-devel,libtool
mm-common,libtool 1.5
mate-common,libtool
lua5.1-policy-dev,libtool
libtool-bin,libtool 2.4.2-1.8~
libtool-bin,libtool 2.4.2-1.11
libsidl-dev,libtool
liblua5.2-dev,libtool
liblua5.1-0-dev,libtool
libltdl-dev,libtool 1.5.20
libltdl-dev,libtool 1.5.20
libltdl-dev,libtool
libdune-common-dev,libtool
grid-packaging-tools,libtool
gnulib,libtool
gnome-common,libtool
gcc,libtool
freehdl,libtool
drizzle-plugin-dev,libtool
dh-lua,libtool
dh-autoreconf,libtool 2.4.2
autoconf,libtool
anjuta,libtool
Dependencies:
2.4.6-2 - gcc (16 (null)) c-compiler (0 (null)) cpp (0 (null)) libc6-dev (16 (null)) libc-dev (0 (null)) file (0 (null)) autotools-dev (0 (null)) libtool-doc (0 (null)) autoconf (4 2.50) automaken (0 (null)) gfortran (16 (null)) fortran95-compiler (0 (null)) gcj-jdk (0 (null)) libltdl-dev (0 (null)) autoconf (1 2.12) automake (1 1.3) libtool1.4 (0 (null))
2.4.2-1.11 - gcc (16 (null)) c-compiler (0 (null)) cpp (0 (null)) libc6-dev (16 (null)) libc-dev (0 (null)) file (0 (null)) autotools-dev (0 (null)) libtool-doc (0 (null)) autoconf (4 2.50) automaken (0 (null)) gfortran (16 (null)) fortran95-compiler (0 (null)) gcj-jdk (0 (null)) libltdl-dev (0 (null)) autoconf (1 2.12) automake (1 1.3) libtool1.4 (0 (null))
Provides:
2.4.6-2 -
2.4.2-1.11 -
Reverse Provides: