"apt-cache search" or how to never find anything you need
Filed under: aptFor years I've heard Debian folks brag about how superior .deb is to .rpm. Whatever. I've been using some Debian and Ubuntu boxes for several months now and I can assure you that the package management tools on those platforms are as primitive as any other distro, and in many ways they are far worse.
Here's a quick example. From the command line, locate and install OpenSSL development files:
Ubuntu 9.10:
# apt-cache search openssl erlang-crypto - Erlang/OTP cryprographic modules libcrypt-openssl-bignum-perl - Access OpenSSL multiprecision integer arithmetic libraries libcrypt-openssl-random-perl - Access to the OpenSSL pseudo-random number generator libcrypt-openssl-rsa-perl - Perl module providing basic RSA functionality libcurl3 - Multi-protocol file transfer library (OpenSSL) libcurl3-dbg - libcurl compiled with debug symbols libcurl4-openssl-dev - Development files and documentation for libcurl (OpenSSL) libneon27 - An HTTP and WebDAV client library libopenssl-ruby - OpenSSL interface for Ruby libqca2-plugin-ossl - QCA OSSL plugin for libqca2 openssl-blacklist - list of blacklisted OpenSSL RSA keys openssl-blacklist-extra - list of non-default blacklisted OpenSSL RSA keys openvpn - virtual private network daemon python-openssl - Python wrapper around the OpenSSL library python-openssl-dbg - Python wrapper around the OpenSSL library (debug extension) python-openssl-doc - Python wrapper around the OpenSSL library (documentation package) ssl-cert - simple debconf wrapper for OpenSSL aolserver4-nsopenssl - AOLserver 4 module: module for SSL mode cl-plus-ssl - A simple Common Lisp interface to OpenSSL cl-ssl - Common Lisp interface to OpenSSL package cryptmount - Management of encrypted file systems cryptonit - A client side PKI (X.509) cryptographic tool ebox-ca - eBox - Certification Authority elfsign - ELF binary signing and verification utilities etpan-ng - console mail user agent based on libEtPan! fp-units-net - Free Pascal - networking units gjots2 - A simple jotter (outline processor) for X11/gtk-gnome globus-openssl-progs - Globus Toolkit - Openssl Library Programs libace-ssl-5.6.3 - ACE secure socket layer library libapache2-mod-gnutls - Apache module for SSL and TLS encryption with GnuTLS libcrypt-openssl-dsa-perl - module which implements the DSA signature verification system libcrypt-openssl-x509-perl - Perl extension to OpenSSL's X509 API libcrypt-ssleay-perl - Support for https protocol in LWP libengine-pkcs11-openssl - OpenSSL engine for PKCS#11 modules libengine-tpm-openssl - OpenSSL engine for TPM modules libglobus-gsi-callback0 - Globus Toolkit - Globus GSI Callback Library libglobus-gsi-openssl-error-dev - Globus Toolkit - Globus OpenSSL Error Handling Development Files libglobus-gsi-openssl-error-doc - Globus Toolkit - Globus OpenSSL Error Handling Documentation Files libglobus-gsi-openssl-error0 - Globus Toolkit - Globus OpenSSL Error Handling libglobus-gsi-proxy-ssl1 - Globus Toolkit - Globus GSI Proxy SSL Library libglobus-openssl - Globus Toolkit - Openssl Library libglobus-openssl-dev - Globus Toolkit - Openssl Library Development Files libglobus-openssl-module-dev - Globus Toolkit - Globus OpenSSL Module Wrapper Development Files libglobus-openssl-module-doc - Globus Toolkit - Globus OpenSSL Module Wrapper Documentation Files libglobus-openssl-module0 - Globus Toolkit - Globus OpenSSL Module Wrapper libneon26 - An HTTP and WebDAV client library libnewpki2 - PKI based on the OpenSSL low-level API (core library) libopenssl-ruby1.9.1 - OpenSSL interface for Ruby 1.9.1 libpathfinder-dev - Development files for pathfinder libpathfinder-openssl-1 - Pathfinder integration Library for OpenSSL libpoconetssl6 - The C++ Portable Components Network library with SSL libpoconetssl6-dbg - The C++ Portable Components Network library with SSL, dbg version libruby-extras - a bundle of additional libraries for Ruby libruby1.8-extras - a bundle of additional libraries for Ruby 1.8 libssl-ocaml - OCaml bindings for OpenSSL libssl-ocaml-dev - OCaml bindings for OpenSSL libtcnative-1 - Tomcat native library using the apache portable runtime libxmlsec1-openssl - Openssl engine for the XML security library mcrypt - Replacement for old unix crypt(1) newpki-client - PKI based on the OpenSSL low-level API (client package) newpki-server - PKI based on the OpenSSL low-level API (server package) python-ncrypt - python wrapper for OpenSSL somaplayer - player audio for the soma suite stone - TCP/IP packet repeater in the application layer tcl-tls - the TLS OpenSSL extension to Tcl tinyca - simple graphical program for certification authority management zope-externaleditor - Zope External Editor zopeedit - Helper Application for Zope External Editor libapache2-mod-php5 - server-side, HTML-embedded scripting language (Apache 2 module) libopenssl-ruby1.8 - OpenSSL interface for Ruby 1.8 libssl-dev - SSL development libraries, header files and documentation libssl0.9.8 - SSL shared libraries libssl0.9.8-dbg - Symbol tables for libssl and libcrypto openssl - Secure Socket Layer (SSL) binary and related cryptographic tools openssl-doc - Secure Socket Layer (SSL) documentation php5-cgi - server-side, HTML-embedded scripting language (CGI binary) php5-cli - command-line interpreter for the php5 scripting language ruby1.8 - Interpreter of object-oriented scripting language Ruby 1.8 libapache2-mod-php5filter - server-side, HTML-embedded scripting language (apache 2 filter module) libopenssl-ruby1.9 - OpenSSL interface for Ruby 1.9
Pretty much anything that utilizes OpenSSL is listed. Not terribly useful, if you ask me.
Now here's CentOS 5.4:
# yum search openssl globus-gsi-openssl-error.i386 : Globus Toolkit - Globus OpenSSL Error Handling globus-gsi-openssl-error-devel.i386 : Globus Toolkit - Globus OpenSSL Error Handling Development Files globus-gsi-openssl-error-doc.i386 : Globus Toolkit - Globus OpenSSL Error Handling Documentation Files globus-openssl.i386 : Globus Toolkit - Openssl Library globus-openssl-devel.i386 : Globus Toolkit - Openssl Library Development Files globus-openssl-module.i386 : Globus Toolkit - Globus OpenSSL Module Wrapper globus-openssl-module-devel.i386 : Globus Toolkit - Globus OpenSSL Module Wrapper Development Files globus-openssl-module-doc.i386 : Globus Toolkit - Globus OpenSSL Module Wrapper Documentation Files globus-openssl-progs.i386 : Globus Toolkit - Openssl Library Programs m2crypto.i386 : Support for using OpenSSL in python scripts mingw32-openssl.noarch : MinGW port of the OpenSSL toolkit openscada-Transport-SSL.i386 : Open SCADA transports openssl.i386 : The OpenSSL toolkit openssl.i686 : The OpenSSL toolkit openssl-devel.i386 : Files for development of applications which will use OpenSSL openssl-perl.i386 : Perl scripts provided with OpenSSL openssl097a.i386 : The OpenSSL toolkit openvpn.i386 : A full-featured SSL VPN solution perl-Crypt-OpenSSL-Bignum.i386 : Perl interface to OpenSSL for Bignum perl-Crypt-OpenSSL-RSA.i386 : Perl interface to OpenSSL for RSA perl-Crypt-OpenSSL-Random.i386 : Perl interface to OpenSSL for Random perl-Crypt-SSLeay.i386 : Crypt::SSLeay - OpenSSL glue that provides LWP https support perl-Net-SSLeay.i386 : Perl extension for using OpenSSL pkcs11-helper.i386 : A library for using PKCS#11 providers pyOpenSSL.i386 : Python wrapper module around the OpenSSL library tomcat-native.i386 : Tomcat native library tomcatjss.noarch : JSSE implementation using JSS for Tomcat xmlsec1.i386 : Library providing support for "XML Signature" and "XML Encryption" standards xmlsec1-openssl.i386 : OpenSSL crypto plugin for XML Security Library xmlsec1-openssl-devel.i386 : OpenSSL crypto plugin for XML Security Library
We won't even complain about the fact that there is ONE utility "yum" to both search and install packages vs Debians two ("apt-get" and "apt-cache"), but the search results speak for themselves.
Even better, let's look at Gentoo:
# esearch openssl
[ Results for search key : openssl ]
[ Applications found : 8 ]
* app-crypt/openssl-blacklist
Latest version available: 0.4.1
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: https://launchpad.net/ubuntu/+source/openssl-blacklist/
Description: Detection of weak ssl keys produced by certain debian versions between 2006 and 2008
License: GPL-2
* app-crypt/openssl-tpm-engine [ Masked ]
Latest version available: 0.4.1
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://trousers.sourceforge.net
Description: This provides a OpenSSL engine that uses private keys stored in TPM hardware
License: GPL-2
* dev-libs/openssl
Latest version available: 0.9.8h-r1
Latest version installed: 0.9.8h-r1
Size of downloaded files: [no/bad digest]
Homepage: http://www.openssl.org/
Description: Toolkit for SSL v2/v3 and TLS v1
License: openssl
* dev-perl/Crypt-OpenSSL-Bignum
Latest version available: 0.04
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://search.cpan.org/~iroberts/
Description: OpenSSL's multiprecision integer arithmetic
License: Artistic
* dev-perl/Crypt-OpenSSL-RSA
Latest version available: 0.25
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://search.cpan.org/~iroberts/Crypt-OpenSSL-RSA-0.25/
Description: Crypt::OpenSSL::RSA module for perl
License: || ( Artistic GPL-2 )
* dev-perl/Crypt-OpenSSL-Random
Latest version available: 0.04
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://search.cpan.org/~iroberts/
Description: Crypt::OpenSSL::Random module for perl
License: || ( Artistic GPL-2 )
* dev-perl/OpenCA-OpenSSL
Latest version available: 0.9.91-r1
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://search.cpan.org/~madwolf/
Description: The perl OpenCA::SSL Module
License: || ( Artistic GPL-2 )
* dev-python/pyopenssl
Latest version available: 0.6
Latest version installed: [ Not Installed ]
Size of downloaded files: [no/bad digest]
Homepage: http://pyopenssl.sourceforge.net/
Description: Python interface to the OpenSSL library
License: LGPL-2.1
That's pretty ideal. Now to be clear, I do like a lot of stuff about Ubuntu, but frankly the package system isn't one of them. I think the Debian/Ubuntu communities would do well to stop inviting comparisons of this aspect of their favorite distro until it stacks up a little better.
One thing I've noticed is that Ubuntu and Debian seems to have spent more time ensuring that packages are correct and they lack good tools for dealing with the inevitable package that is bad (broken dependencies, etc) whereas the Red Hat side tend to have more bad packages and better tools for dealing with them. Clearly neither approach is anywhere near ideal, but I'd be hard-pressed to say which is worse.







I suggest you try using aptitude instead; you can use it on the commandline just like apt-get, but its all one tool. "aptitude search openssl" and "aptitude install libssl0.9.8" for instance. I believe it will give you more relevant results than apt-cache.
I don't understand why people still instruct new users of apt to use apt-get, aptitude is a far superior tool. In fact apt-get was not originally developed as anything more than a program to test usage of the then developing apt: http://en.wikipedia.org/wiki/Advanced_Packaging_Tool#History
Personally I quite disagree with you when it comes to apt's package management living up to the praise it has garnered, or perhaps I should say, the debian package management system on the whole. Of all the distros I have tried I find that maintaining a system over the course of its lifetime is much easier with apt. Implying the entire system is not up to par based on apt-get's search output is rather narrow minded. Indeed, I believe part of its power is that there ARE several different tools you can use.
I would also point out that without including some numbers on how many packages total are in each of the distribution repositories you searched, your comparison is not apples to apples. While you can certainly complain about the output format, comparing the ubuntu and centos output only shows that perhaps ubuntu has far more packages than centos... Would you prefer that the search tool hid some results from you?
I do agree that the gentoo output is quite nice. I often wish that I had more information on the relevant packages that aptitude turns up for me right from the first search. As things are now I do an aptitude search package-name, then if I require more information I have to enter the aptitude ncurses interface and read the information in there. On the other hand the aptitude search output is very grep friendly which allows me to quickly find the exact the packages I am interested in.