How do I install ALL development libraries?

I want to preinstall all the libraries one could ever need onto a system so someone building something would always have the libraries available.

Like in a computer lab where users are not root.

I want to do something like apt-get install lib* but I don't think that will be a good idea. Is there a package like most-libs-used?


Solution 1:

Run this:

apt-cache search dev|grep "\-dev"|cut -d' ' -f1|sort > available-devs.txt

It will create the file available-devs.txt with a list of all available -dev packges in the archive (and within any PPAs or other archives you have added). You can then go and install them all. You can't install them all at the same time, as there are more package names than allowable program arguments in a POSIX system, so you'll have to install some bit by bit. Also, if you really want to install all of them, I hope you have a very large storage system for your main OS partition.

Also, that only grabs the ones for the arch you're currently on, I think. To install both i386 and x86_64 versions on a 64-bit Ubuntu install, you'd need even more space, and have to install a lot more of the same, with :i386 appended to the package name. But not all libraries in the archive are set up for MultiArch support yet.

Solution 2:

On versions of Ubuntu with multarch support enabled by default (11.10 and later), the metapackage ia32-libs-multarch has many of the commonly needed library packages as dependencies. Of course,ia32-libs-multarch only exists on 64-bit systems, and it provides 32-bit libraries. Installing it will probably not do what you want.

But you can use its list of dependencies (that's for 12.04, here's 11.10) as a reference for what libraries you might want to install to support software users run that is not provided by Ubuntu packages. (If software is provided by Ubuntu packages, then you have to be able to run commands as root to install it normally, and then dependencies will just be installed as needed.)

On Ubuntu 12.04, you can install those packages manually (that is, the versions for the system's actual architecture):

sudo apt-get install install bluez-alsa gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-base gstreamer0.10-plugins-good gtk2-engines gtk2-engines-murrine gtk2-engines-oxygen gtk2-engines-pixbuf gvfs ibus-gtk libacl1 libaio1 libao4 libasound2 libasound2-plugins libasyncns0 libattr1 libaudio2 libcanberra-gtk-module libcap2 libcapi20-3 libcups2 libcupsimage2 libcurl3 libdbus-glib-1-2 libesd0 libfontconfig1 libfreetype6 libgail-common libgconf-2-4 libgdbm3 libgettextpo0 libglapi-mesa libglu1-mesa libgphoto2-2 libgphoto2-port0 libgtk2.0-0 libmpg123-0 libncursesw5 libnspr4 libnss3 libodbc1 libopenal1 libpulse-mainloop-glib0 libpulsedsp libqt4-dbus libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtwebkit4 librsvg2-common libsane libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 libsdl-ttf2.0-0 libsdl1.2debian libsqlite3-0 libssl0.9.8 libssl1.0.0 libstdc++5 libstdc++6 libxaw7 libxml2 libxp6 libxslt1.1 libxss1 libxtst6 odbcinst1debian2 xaw3dg libgl1-mesa-dri libgl1-mesa-glx libnss-ldap libpam-ldap libpam-winbind

You can do this on previous releases too, though you'll have to change some of the versions numbers in the package names (which ones need it will become apparent if you jus try running the command as-is, and you can look up packages with similar names here. For Ubuntu 11.10, you could install the packages named as dependencies here. (Though it would probably be easier to look at error messages from running the above command, and just substitute the small handfull of packages from that list.)

Solution 3:

You could take a look at apt-get build-dep. Basically, it offers you all the build dependencies of a certain package.

Thus, apt-get build-dep chromium-browser would install all necessary libraries in order to build Chromium.

Solution 4:

I wrote a script to do just that! You can get it here: http://littlesvr.ca/grumble/2012/12/12/install-all-the-dev-and-doc-packages-in-debianubuntumint/

Would be awesome if it (or something like it) were included in the distro by default.