apt-cache for all your shopping needs!
#2
(09-30-2016, 02:19 PM)tampadave Wrote: Hello all.

apt-cache is the tool I use to look for packages that are available for my build.  In this case, ubuntu 16.04LTS on arm64.  

apt-cache does not require sudo, and is good to identify the actual package name for whatever program you're looking for, and if there is none, you'll find that out too.  Mind you, this is for packages, not all possible projects or source code.  Packages are normally software products that work, are packaged, on this distribution, and are popular or essential enough to merit their inclusion in the package database (atp-cache).


Code:
apt-cache stats
will show you the current status of your apt-cache database.


Code:
apt-cache showpkg <package_name_here>
 will give you an idea of what would be installed, including dependencies, were you to install the package from that package name.  Which begs the question: "how do I learn the package name for the package I want to install?"  Good question!


Code:
apt-cache search <regex_term>
 will return a list of packages that include that search term.  You can grep it further, or just read through it to find your package name.  Lots of times, I'm off just a little in the spelling of the package name (grrr...) and this lets me find out what IT calls it.

There are more commands for apt-cache, and man apt-cache will get you the manual page for this very handy tool.  apt-cache search and apt-cache showpkg have been indispensable to my learning this new platform.  Use them and you will see.

Oh, and as is usually the case, all of these commands are from bash (the Bourne Again Shell).


David

aptitude is a much more user-friendly tool if on debian (as is already installed) or ubuntu (you may need to do a "sudo apt-get install aptitude" to install it). It also doesn't need sudo for searches, and will prompt if it does need admin privileges at any point. It can be completely keyboard controlled, or with mouse and keyboard. And if you use it instead of apt-get (with the same syntax), it will even try to help work out dependency issues, etc for you.

That's not to say your info isn't helpful David... quite the opposite... tools like apt-cache are essential on systems like these in order to see what packages you can install! Big Grin
  Reply


Messages In This Thread
RE: apt-cache for all your shopping needs! - by pfeerick - 09-30-2016, 07:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)