Each deb package have list of dependencies that should be met before installation. You can list dependencies of deb file using dpkg --info path_to.deb
. Here is the example:
new debian package, version 2.0.
size 5800810 bytes: control archive=2527 bytes.
1301 bytes, 20 lines control
3074 bytes, 41 lines md5sums
721 bytes, 22 lines * postinst #!/bin/sh
637 bytes, 18 lines * postrm #!/bin/sh
Package: qgis
Version: 1.8.0~precise1
Architecture: i386
Maintainer: Quantum GIS developers <qgis-developer@lists.osgeo.org>
Installed-Size: 10374
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libgdal1-1.7.0, libgsl0ldbl (>= 1.9), libpq5, libproj0, libqgis1.8.0, libqt4-network (>= 4:4.5.3), libqt4-sql (>= 4:4.5.3), libqt4-svg (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.8.0), libqtgui4 (>= 4:4.8.0), libqtwebkit4 (>= 2.2~2011week36), libqwt5-qt4, libspatialite3 (>= 3.0.0~beta20110817), libsqlite3-0 (>= 3.5.9), libstdc++6 (>= 4.6), qgis-providers (= 1.8.0~precise1), qgis-common (= 1.8.0~precise1)
Recommends: qgis-plugin-globe, qgis-plugin-grass, python-qgis
Suggests: gpsbabel
Conflicts: uim-qt3
Section: science
Priority: extra
Homepage: http://qgis.org/
Description: Geographic Information System (GIS)
A Geographic Information System (GIS) manages, analyzes, and displays
databases of geographic information. Quantum GIS (QGIS) supports shape file
viewing and editing, spatial data storage with PostgreSQL/PostGIS, projection
on-the-fly, map composition, and a number of other features via a plugin
interface. QGIS also supports display of various georeferenced raster and
Digital Elevation Model (DEM) formats including GeoTIFF, Arc/Info ASCII Grid,
and USGS ASCII DEM.
Most important for you is section "Depends" contains a list of packages and their version that must be installed to install your package. For each package may be information about exact version, minimal version or maximal version.
As you can see above qgis
requires libgdal1-1.7.0
(it's name not version). Current version of this package in Ubuntu repo is 1.7.3-6ubuntu3
(notice that minimal version of package is not provided!).
When you compile that lib from sources (./configure && make && make install
or something like that) you put binaries of that package in system directories. But when you installing package via apt, synaptic or aptitude they don't care about binaries. They're using installed packages index (somewhere in /var/
) and they don't know that you installed that library from sources, so they're installing all dependencies. To make that tools aware that there is gdal
in system you could prepare deb package from compiled source code and install it using dpkg. There should be some tutorial about that on Debian's wiki. But even when you prepare such package package management tools still will be looking for package with name libgdal1-1.7.0
(of course you could prepare package with gdal
1.9.1 and name it libgdal1-1.7.0
, but it's not good idea - there could be some API changes in newer version and it is possible that qgis
will crash or something like this).
Why qgis
is using old gdal
?
Ubuntu have long release cycle, so when package repo was freezed it could be better idea for some reasons to use older version of this package. Or maybe there is no one willing to prepare new version? ;)
Is there a way to change dependency list?
Yes. You can download selected package and repack it with changed dependency list:
mkdir tmp
dpkg -x package.deb ./tmp
dpkg -e package.deb
nano ./tmp/DEBIAN/control and change dependency list
mkdir ./build
dpkg-deb -b ./tmp ./build
You can do that, but there is a chance that you will have some problems in future with installing software because of inconsistency in global installed packages list.