-1

Love to have nmap on my #raspberrypi, but:

root@qwers:/home/pi# apt-get update
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 https://deb.nodesource.com/node_9.x stretch InRelease
Reading package lists... Done
root@qwers:/home/pi# apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nmap
  1. apt-cache search nmap has no result:
  2. and /etc/apt/sources.list: No such file or directory

Went trough these steps without any result: apt - "E: Unable to locate package update" when I try to update my system, why? - Ask Ubuntu

Ended up here to: Apt "could not find a distribution template" error - Ask Ubuntu with the result of:

aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch
-2

Raspbian - unable to locate package mysql-server-5.6 after adding repo - Raspberry Pi Stack Exchange led me to the solution after realized

  1. the /etc/apt/sources.list was a broken symlink to /etc/apt/sources.list.d/official-package-repositories.list
  2. solution: cp /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list
  3. then deb http://archive.raspbian.org/raspbian/ stretch main added to the list
  4. apt-get update
  5. apt-get install nmap
  6. Success
  • seems like the issue is that your /etc/apt/sources.list file was missing/corrupt/compelte garbage ... changing that file to be the node source list is not really a solution - because now you have no way to update raspbian ... also, /etc/apt/sources.list.d/nodesource.list is not part of the standard raspbian distro. Clearly when you configured your system to access node repositories, you messed things up badly! – Jaromanda X Jun 12 '18 at 0:06
  • 1
    This is an absolutely horrible answer – Jaromanda X Jun 12 '18 at 12:58
  • raspbian updating well after this.. what can be the solution then @JaromandaX – eapo Jun 13 '18 at 2:59
  • Is it? You must have an odd setup in /etc/apt – Jaromanda X Jun 13 '18 at 3:12

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.