1

I am trying to install some packages. I have already downloaded the .debs to my local repo and apt is aware of it since apt-cache policy shows the package, but when trying to install the package, it tries to download the .debs yet again. Please tell me how I can prevent this?

Note that I have already seen https://askubuntu.com/questions/347913/why-apt-get-doesnt-download-from-local-repository and Assign highest priority to my local repository (which the previous one refers to). But even after using /etc/apt/preferences and though the local package is being shown as the first item by apt-cache policy, my problem remains. Please see below for an example:

$ sudo apt-get -y install --print-uris clang | grep "http://"
'http://in.archive.ubuntu.com/pool/main/b/binfmt-support/binfmt-support_2.1.4-1_amd64.deb' binfmt-support_2.1.4-1_amd64.deb 49048 MD5Sum:fd7c64c41dc4633a7b4e02e8e9246bcd
'http://in.archive.ubuntu.com/pool/universe/l/llvm-toolchain-3.4/clang-3.4_3.4-1ubuntu3_amd64.deb' clang-3.4_1%3a3.4-1ubuntu3_amd64.deb 8921842 MD5Sum:45c1b69f8daecd1060f65e1595b03e88
'http://in.archive.ubuntu.com/pool/universe/l/llvm-defaults/clang_3.4-0ubuntu1_amd64.deb' clang_1%3a3.4-0ubuntu1_amd64.deb 2476 MD5Sum:76820e828365b314d85a28e4b174c62e
$ apt-cache policy binfmt-support clang clang-3.4
binfmt-support:
  Installed: (none)
  Candidate: 2.1.4-1
  Version table:
2.1.4-1 0
    999 file:/home/samjnaa/ab/trusty/orig_amd64_a-g/  Packages
    500 http://in.archive.ubuntu.com/ trusty/main amd64 Packages
clang:
  Installed: (none)
  Candidate: 1:3.4-0ubuntu1
  Version table:
1:3.4-0ubuntu1 0
    999 file:/home/samjnaa/ab/trusty/orig_amd64_a-g/  Packages
    500 http://in.archive.ubuntu.com/ trusty/universe amd64 Packages
clang-3.4:
  Installed: (none)
  Candidate: 1:3.4-1ubuntu3
  Version table:
1:3.4-1ubuntu3 0
    999 file:/home/samjnaa/ab/trusty/orig_amd64_a-g/  Packages
    500 http://in.archive.ubuntu.com/ trusty/universe amd64 Packages
$ cat /etc/apt/preferences
Package: *
Pin: origin ""
Pin-Priority: 999
$

I am using Trusty LTS 14.04.2. Note that I am not using /etc/apt/sources.list but I have four files 1-local.list, 2-net-orig.list, 3-net-thirdparty.list and 4-net-ppas.list under /etc/apt/sources.list.d/ and these are numbered for the desired order of priority.

0

You must log in to answer this question.

Browse other questions tagged .