0

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:
  • I use the pi as a web servers for my consulting business, not for dev. I updated the question to reflect this, if it is still not applicable how do I move the question to super user? – Element Zero Aug 14 '17 at 18:38
2

You don't. The apt package dependency mechanism is based entirely on package names and versions. What you're supposed to do is find a newer package (or build one) that satisfies the dependencies and use that. Anything else is madness. The repo you got php7.0-dev from should provide all its dependencies (or at least tell you where to get them from). That it doesn't suggests it isn't a quality source of packages, and so you're spearing into dangerous territory. If that's your thing, then read on...

If you want to duct tape a shotgun to your foot and file the trigger pull back to a feather touch, you can use a package called equivs to install a "dummy" package that doesn't, itself, have any files in it, but exists to satisfy the dependency. As my colourful metaphor suggests, though, this is sort of thing that is almost certainly going to come back to cause you untold problems in the future, and I'd consider it tantamount to negligence to do it on a production system.

  • Going ahead and marking this as the answer as my question is how to tell apt to use the built code in the first place. In order to actually fix this I saw that libtool 2.4.6 was available in stretch based off the apt-cache showpkg and so I just upgrade the pi to stretch using this linuxconfig.org/… – Element Zero Aug 15 '17 at 17:57
  • The short answer to your question is, "you don't". The longer answer is, "put it in a package if you want apt to know about it". – womble Aug 16 '17 at 23:57

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.