I am trying to understand the Unable to locate package error.

In my case I am trying to install zcash. After installing dependencies and following initial setup, I updated my sources.list file:

echo "deb [arch=amd64] https://apt.z.cash/ jessie main" | sudo tee /etc/apt/sources.list.d/zcash.list

Then I ran sudo apt-get update

Looking at /var/lib/apt/lists I can see the installed packages (in this case from zcash):

/var/lib/apt/lists$ ls

However when I run sudo apt-get install zcash it seems to not recognise the name zcash:

Reading package lists... Done Building dependency tree        
Reading state information... Done 
E: Unable to locate package zcash

I imagine there should be a name translation file (e.g. zcash to files referenced in /var/lib/apt/lists) - am I correct?

In which file/directory should the name reference for an apt package be stored? How would I check and debug this?

  • 1
    Search for package name in Synaptic. If synaptic can not find it, the package does not exist for the running debian instance. However, have you installed apt-transport-https and added the "Zcash master signing key" ? before apt-get update? – Arrow Jul 2 '17 at 18:16
  • @Arrow thanks, yes I did the prior steps (and as far as I can tell it worked). – atomh33ls Jul 2 '17 at 18:18
  • @Arrow thanks for the synaptic tip - zcash does not appear there – atomh33ls Jul 2 '17 at 18:22
  • 1
    Then, the package is not installable, as synaptic use the same list of packages as apt-get, and, if a package does not appear in apt-get it is simply not-installable. – Arrow Jul 2 '17 at 18:47
  • 1
    The stable version of debian is Stretch (not the now oldstable Jessie). Is that the version you are running? The repository you are adding is for Jessie (not Stretch). Maybe you have got a problem with that. – Arrow Jul 2 '17 at 18:51

Just saw this and so I tested...

On a base install of Jessie in VirtualBox (amd64 netinstall, only "standard system utilities" and "ssh server") I had no problems getting zcash installed... However, my guess is that you didn't add the key to the repo...

Edited /etc/apt/sources.list and added the line

deb https://apt.z.cash/ jessie main

Add the apt-transport-https

apt-get install apt-transport-https

Do an apt-get update. Argh... repo gpg key error. Import/add the key for the repository -

wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add -

Then did apt-get update and then apt-get install zcash

root@templatevm:~# apt-get install zcash
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
The following NEW packages will be installed:
  libgomp1 zcash
0 upgraded, 2 newly installed, 0 to remove and 55 not upgraded.
Need to get 3,185 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.us.debian.org/debian/ jessie/main libgomp1 amd64 4.9.2-10 [37.8 kB]
Get:2 https://apt.z.cash/ jessie/main zcash amd64 1.0.10+1 [3,147 kB]
Fetched 3,185 kB in 8s (359 kB/s)                                                                                    
Selecting previously unselected package libgomp1:amd64.
(Reading database ... 29996 files and directories currently installed.)
Preparing to unpack .../libgomp1_4.9.2-10_amd64.deb ...
Unpacking libgomp1:amd64 (4.9.2-10) ...
Selecting previously unselected package zcash.
Preparing to unpack .../zcash_1.0.10+1_amd64.deb ...
Unpacking zcash (1.0.10+1) ...
Processing triggers for man-db ( ...
Setting up libgomp1:amd64 (4.9.2-10) ...
Setting up zcash (1.0.10+1) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...
  • My error was in using an i386 image not amd64... thanks – atomh33ls Jul 2 '17 at 21:48

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.