Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am getting this error whenever I install any package from the terminal. What is wrong?

apt-get install gnome-tweak-tool
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package gnome-tweak-tool 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 'gnome-tweak-tool' has no installation candidate
share|improve this question
    
it's because the package name is incorrect! That's what that message means. try sudo apt-get install htop –  Alvar Mar 19 at 13:17
    
What version of Ubuntu are you using? Is this the only package which produces this error? @Alvar That's the correct name for GNOME Tweak Tool's package :-) –  edwin Mar 19 at 13:18
    
You can also download gnome-tweak-tool.deb file from here: pkgs.org/download/gnome-tweak-tool –  4M01 Mar 19 at 13:22
    
True, the name can be correct and the message still appears. Then it means the package can't be found in the sources. So What version of Ubuntu do you have? Have you modified your source list in any way? –  Alvar Mar 19 at 13:31
1  
Try to review/reset your sources list, then run 'apt-get update' before checking again –  Ahmadgeo Mar 19 at 14:28

1 Answer 1

Use the command sequence below, to reset your APT-GET sources list

sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-key update
apt-get update
apt-get install gnome-tweak-tool
share|improve this answer
1  
What will this do and why would it help? –  Alvar Mar 19 at 14:59
    
This will reset your APT-GET sources list. –  byaruhaf Mar 19 at 15:01
    
No it doesn't. The package source list is located in /etc/apt/. /var/lib/apt/lists holds the lists of known packages retrieved from all configured sources during the last apt-get update. It may help to delete that in some rare circumstances and has no important adverse effects, but usually apt-get update is enough. All the other things you mention aside from rm -rf /var/lib/apt/lists && mkdir -p /var/lib/apt/lists/partial && apt-get update are unnecessary voodoo in relation to OP's issue. –  David Foerster Oct 26 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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