In order to install Electrum Bitcoin Wallet, I need to install pyqt4. When I run the command sudo apt-get install python-qt4 I get the error "Unable to locate package". How can I solve this?

I'm on Ubuntu 16.04.

Thanks a lot for your help

  • 1
    Did you enable the universe repository (and then update your package list) first? Nov 1, 2016 at 1:40

1 Answer 1


First try this:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade 

Then this:

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse

Then before you try installing the package again, I suggest looking into your sources list:

nano /etc/apt/sources.list

Go online and look at what Ubuntu default source list is supposed to look like and compare it to yours. If everything is fine, then go on and install the package. If you still get an error, reply back.

  • Thanks for submitting an answer! By the way, you can improve your answer by describing what the apt commands do.
    – wjandrea
    Nov 1, 2016 at 4:33
  • @alejoss I would clean first, then sudo the repositories, then do the updates and upgrades. After all that check the sources list. Nov 1, 2016 at 4:34
  • On Debian, I get "Error: 'universe' invalid" for universe, restricted, and multiverse
    – B T
    Aug 5, 2017 at 0:22

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.