2

As you can probably tell by the title, I'm a complete novice in Linux environments.

Trying to work out how to install apps using sudo apt-get install. I have been able to install some, but recently it started to fail.

For example I'd like to install elementary-tweaks, but the error message is the same, for all E: Unable to locate package elementary-tweaks

I THINK I understand that if I add a PPA I should access the packages associated with that PPA.

Therefore I have tried removing previous PPAs (as seen on some answers on this site), and add this: https://code.launchpad.net/~versable/+archive/ubuntu/elementary-update followed by a sudo apt-get update.

I have also tried sudo apt-get -f install, PPA purge, etc...

Still, the error message remains.

Error message:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
E: Unable to locate package elementary-tweaks

Could anyone please point it out for me, what am I missing in this? Also that what is a possible resolution to similar cases?

Thanks!

Alex Szabo
  • 123
  • 1
  • 6
  • It'd be useful if you provided the exact error message text, what command you're running, etc. The devil is likely in the details. Does the package show in a apt-cache search? – ernie Oct 10 '14 at 22:04

3 Answers3

1

That's should work for any Elementary OS, the proper way to add ppa

sudo apt-add-repository ppa:versable/elementary-update
sudo apt-get update
sudo apt-get install elementary-tweaks

So .. If that not work then update the Q with the Error

Ahed Eid
  • 1,042
  • 10
  • 15
  • 1
    went through your instructions -- in the end, still says "unable to locate package elementary-tweaks" – alernerdev Oct 09 '18 at 19:04
  • that will work only for 0.3 Freya which are based on ubuntu 14.04. elementary-tweaks not updated to work with 0.4 Loki https://launchpad.net/elementary-tweaks/+packages – Ahed Eid Oct 10 '18 at 09:47
0
  1. Backup your /etc/apt/sources.list file first

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

  2. Edit your /etc/apt/sources.list

    sudo nano /etc/apt/sources.list

  3. Copy/paste the content below and save /etc/apt/sources.list file

  4. Update the apt

    sudo apt update

  5. Try installing your app again. For example:

    sudo apt install snapd


# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to  
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse```
Arda Basoglu
  • 101
  • 1
  • According to [Ubuntu package search](https://packages.ubuntu.com/search?keywords=elementary-tweaks&searchon=names&suite=all&section=all), elementary-tweaks never made its way to official repositories of Ubuntu, not even on Xenial Xerus (16.04) (which obviously questioner was not using since question was asked 2 years before 16.04's release). Moreover, is there anything else which was to be added in your answer, since there's an orphan `5.` in your post? – Kulfy Dec 26 '20 at 11:51
  • @Kulfy I'm still trying to format my answer (I guess there is a bug about formatting). That's why it's missing 5. This solution worked for me and I'm using elementary OS 5.1 Hera. – Arda Basoglu Dec 26 '20 at 12:05
  • ***I guess there is a bug about formatting***: Nope. It's just that the code block of `4.` was never closed. See [fomatting help](https://superuser.com/editing-help#code). ***This solution worked for me and I'm using elementary OS 5.1 Hera***: That's surprising. Also, Hera is based on 18.04 (bionic beaver). It's a bad idea to keep older repositories since you may miss critical security updates as well. Can you please show me the output of `apt-cache policy elementary-tweaks`? – Kulfy Dec 26 '20 at 12:11
  • I formatted in a different way now. The output of `apt-cache policy elementary-tweaks` is `N: Unable to locate package elementary-tweaks` – Arda Basoglu Dec 26 '20 at 12:16
  • OK. So your answer was not for elementary tweaks for which the question was originally posted. `snapd` is a different case. Unlike elementary-tweak it's in official repositories of Ubuntu. – Kulfy Dec 26 '20 at 12:19
  • @Kulfy you are right; my suggestion does not solve **elementary-tweaks** installation issue. However, I found this page when searching a solution to my **E: Unable to locate package...** problem because I could not install **snapd**. Since you made everything clearer maybe other people can get some idea off this situation. – Arda Basoglu Dec 26 '20 at 12:29
0

make sure you're in the home directory. just close out the terminal and open a new terminal window.

via https://launchpad.net/elementary-tweaks:

sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily && sudo apt-get update && sudo apt-get install elementary-tweaks

dracer
  • 11
  • are these instructions no longer valid? I am getting a lot of "Failed to fetch" messages, and there is no tweak package in the end. – alernerdev Oct 09 '18 at 19:02