2
$ apt-get source libtiff4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'tiff3' as source package instead of 'libtiff4'
E: Unable to find a source package for tiff3

If I add -f, it doesn't change the behavior. What is causing it to do this and how do I force it to download the package I want?

Based on a search, I can't even tell where it is getting the idea of tiff3

$ apt-cache search libtiff
libtiff-doc - TIFF manipulation and conversion documentation
libtiff-tools - TIFF manipulation and conversion tools
libtiff5 - Tag Image File Format (TIFF) library
libtiff5-alt-dev - Tag Image File Format library (TIFF), alternative development files
libtiff5-dev - Tag Image File Format library (TIFF), development files
libtiffxx5 - Tag Image File Format (TIFF) library -- C++ interface
gem-plugin-tiff - Graphics Environment for Multimedia - TIFF support
libtiff-opengl - TIFF manipulation and conversion tools
libtiff4 - Tag Image File Format (TIFF) library (old version)
libtiff4-dev - Tag Image File Format (TIFF) library (old version), development files
libtiffxx0c2 - Tag Image File Format (TIFF) library (old version) -- C++ interface
pngtools - series of tools for PNG (Portable Network Graphics) images
python-libtiff - wrapper to the libtiff library to Python using ctypes
boatcoder
  • 599

2 Answers2

1

There is not a 1-to-1 relationship between binary packages and their corresponding source packages. Reasons for this include:

  • In some cases, multiple binary packages will be derived from a single source
  • The names will be slightly different to reflect versioning of the binary packgage
  • Some packages do not directly include binaries, but instead only specify dependency packages which should be installed.

I am not able to reproduce your specific issue, maybe because I have a newer version of Ubuntu installed. Below is a walk-through of a similar issue with a similar library (note that everything in my example is already installed, but the displayed information about mapping and dependencies is still relevant). This should give some good hints about how to deal with this type of issue.

I have successfully installed a package called libjpeg8:

$ sudo apt-get install libjpeg8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjpeg8 is already the newest version.

I try to get the source, but it is remapped to something with the suffix -empty.

$ apt-get source libjpeg8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'libjpeg8-empty' as source package instead of 'libjpeg8'
Skipping unpack of already unpacked source in libjpeg8-empty-8c

I list the dependencies of the desired package, and notice libjpeg-turbo8:

$ apt-cache depends libjpeg8
libjpeg8
  Depends: libjpeg-turbo8
  Replaces: libjpeg8:i386
  Breaks: libjpeg8:i386

I install the source for libjpeg-turbo8, and I get the source that I needed:

$ apt-get source libjpeg-turbo8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'libjpeg-turbo' as source package instead of 'libjpeg-turbo8'
Skipping unpack of already unpacked source in libjpeg-turbo-1.3.0
0

Make sure you have your "Source code" entry check marked in "Software and Updates".

software and updates screenshot

If not, check mark it and and open a terminal and:

sudo apt-get update

(you probably don't need to do this, if you get a dialog box asking you to reload the package list after you have check-marked if if was not) and then do:

apt-get source libtiff4-dev

to fetch the source code for libtiff4.

jobin
  • 27,708