LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "sudo apt-get install" not seeing most packages (https://www.linuxquestions.org/questions/linux-software-2/sudo-apt-get-install-not-seeing-most-packages-660889/)

computer_freak_8 08-06-2008 10:08 AM

"sudo apt-get install" not seeing most packages
 
I am trying to install Firefox. The commands "sudo apt-get install firefox" and "sudo apt-get install firefox-3.0" both yield a "Couldn't find package" error. I know I'm online; I can successfully execute "ping google.com".

However, when I enter "sudo apt-get install " followed by the [Tab] key twice, I am asked: "Display all 2520 possibilities? (y or n)". When I run that same command on my other (working) computer, I am asked: "Display all 32397 possibilities? (y or n)". This means that less than 8% of the possible packages are seen by the (non-working) computer.

One more thing: The "/etc/apt/sources.list" files of the non-working computer is identical to the "/etc/apt/sources.list" file of the working computer, so that can't be the problem...

Any ideas on how to fix this, anyone?

tredegar 08-06-2008 10:33 AM

Did you do a
Code:

sudo apt-get update
before trying to install new software, or after changing your sources.list?

From man apt-get:
Code:

      update
          update is used to resynchronize the package index files from their
          sources. The indexes of available packages are fetched from the
          location(s) specified in /etc/apt/sources.list. For example, when
          using a Debian archive, this command retrieves and scans the
          Packages.gz files, so that information about new and updated
          packages is available.


b0uncer 08-06-2008 12:08 PM

If you use apt-get from command line, you should run the update command pointed to above every time you install or update packages with apt-get, unless you're very sure the package information is up to date (i.e. if you have already run the update command recently). If you don't, it might lead to a funny-looking situation where some of the dependencies are found for a package you're installing, but others are not. It's funny-looking because it isn't really true, and with properly working mirrors that situation shouldn't come at you - if you remember to update the package lists :)

Another point is that you should be sure about the package name you're trying to install; the package might not be 'firefox' nor 'firefox-3', but 'firefox-browser' or something instead. Not saying it is, but take it as an example. If you blind-shoot like that, you might end up installing something you didn't intend to - in the worst case, a package that harms your system (read more about security issues concerning this sort of package managers to get the full idea). So before issuing commands, especially before issuing them with root privileges (with sudo or as root), make sure you know what you're doing and that the command is correct.

computer_freak_8 08-06-2008 04:07 PM

tredegar and b0uncer - Thank you both so much! I had tried running the dist-upgrade, but update didn't even cross my mind. Well, it works now. Thanks again.

Oh, and b0uncer:
Quote:

Originally Posted by b0uncer (Post 3238897)
Another point is that you should be sure about the package name you're trying to install; the package might not be 'firefox' nor 'firefox-3', but 'firefox-browser' or something instead. Not saying it is, but take it as an example. If you blind-shoot like that, you might end up installing something you didn't intend to - in the worst case, a package that harms your system (read more about security issues concerning this sort of package managers to get the full idea).

Yes, this is exactly how I installed it on the working computer. I have heard about the security issue, but as I understood it, unless your sources file points to a bad site, it wouldn't work maliciously because the package manager wasn't looking there. (Unless of course someone hacked the repositories and put something bad there...)

Thanks again to both of you!


All times are GMT -5. The time now is 08:02 AM.