So, I am trying to set up my raspberry pi model 2B as a wifi hotspot. All the articles recommended installing and using hostapd and dnsmasq. I was able to install the dnsmasq package without any problems, but when I tries to install hostapd, I got this error...

E: Unable to locate package hostapd

I realize that the error means that the package was not able to be located, but all the other forums I looed at said that everything I typed into the terminal was correct. Is it that hostapd is depreciated, or not exists anymore?

NOTE: I already ran the commands to update and upgrade the Pi, and I did not run into any problems.


  • What OS are you running? Raspbian? Which version? Commented Apr 13, 2018 at 8:43
  • I am running Raspbian Stretch on the model 2B.
    – jdw136
    Commented Apr 13, 2018 at 20:56

1 Answer 1


Make sure your apt database is up to date with:

sudo apt-get update

and then try installing hostapd again. There was a change recently that required the database to be updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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