0

I have all repositories activated (main, universe, multiverse, restricted) in the software center per default. If I make changes (e.g. I would uncheck the box for multiverse) I cannot install the software from this repository anymore using software center.

Will it be possible to install the software from multiverse using "apt-get"?

0

No, it will not be possible. apt-get works with the repositories that are defined in sources.list, as the software center does.

You'll find this kind of "layered" systems in many places in linux. To illustrate this, let's look at how an application is installed "low level". To install an application, several (in most cases, many) applications need to be copied to several (or many) different directories. The executable file needs to go to one directory, some libraries need to go to another directory, some manuals (man pages) need to go to yet another directory, some icons need to go to still another directory, and so forth. When you want to deinstall the application later, you'd have to "tidy up" all those files in all those different places.

To make this easier, there's the package manager dpkg. A deb package (named this because it was originally developed for Debian, which Ubuntu is based on) is, more or less, an archive that contains files with the information where those files should go. When you install a package, the files are copied to the appropriate places; when you deinstall it, the files are removed. To do this, the "usual", low level tools like for example tar are used. This illustrates the concept: dpkg uses what is already there to simplify a task.

Additionally, a package mostly has dependencies. A package can say, "if you want to install me, you need to install this other package as well, because it contains files I need". Or, "if you want to install me, you can't install this other package, because our files would conflict". Again, there's an additional layer on top of "copy some files to the right directories", that uses what's already there.

The next question would be, where do I get those packages? This is where the next layer comes in, the apt tools (apt-get, apt-cache and so on). With apt, you can manage package sources, so called repositories, where it can automatically fetch packages. A repository can be on a server somewhere in the net, on a CD or DVD, on your local hard disk and so forth. Which repositories are available is defined in sources.list. From these repositories, the apt tools build a cache, which is essentially a list of the packages that are available from the repositories.

So if you install a package with apt-get, it is fetched from the respective repository and handed to dpkg. dpkg, in turn, installs the package like described above, with tools like tar.

In the next layer, there are GUI tools like Synaptic or the software center. They offer the possibility to manage your packages with a graphical interface instead of "only" on the command line. The GUI tools "under the hood" hand the work over to the apt tools, which (as described) use dpkg, which uses tools like tar. So, apt-get can't possibly know about any repositories the software center doesn't know about. In fact, it's the other way around: The software center works "on top" of apt's cache, so it can only know about the repositories that are defined in sources.list.

The description above can of course only be an outline, with many details and additional features of the respective layers omitted. For example, there's the sources.list.d directory in which additional repositories can be defined. They, of course, apply to the apt tools as well to GUI tools like the software center. Another example, the software center not only offers to manage your packages with a graphical interface, but offers the possibility to sell and buy packages as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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