I am trying to install kali linux on my docker. So, i just tried to follow this page. After i run these two commands:

docker pull kalilinux/kali-linux-docker
docker run -t -i kalilinux/kali-linux-docker /bin/bash

and i have the kali image on my docker. but when i try the command:

apt-get install metasploit

i face with:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package metasploit is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'metasploit' has no installation candidate

so, how can i solve it?

  • 4
    I'm voting to close this question as off-topic because it's a general Linux package management question more suited for Unix & Linux. – Boycott SE for Monica Cellio Jan 31 '17 at 23:26
  • Because this is maintained by the Kali devs, you should ask on their support forum – schroeder Feb 1 '17 at 8:15

When you search it (apt-cache search metasploit) you see that the package is called metasploit-framework. So you can install it with apt-get install metasploit-framework -y. And you should use apt-get update before to get the latest version.


This page was useful. i used:

apt-get -y update ; apt-get -y --force-yes install ruby metasploit-framework

and it helped me

Not the answer you're looking for? Browse other questions tagged or ask your own question.