I was wondering why the software center doesn't download all the requested apps and install one by one as they finish to download. Or instead why the software center doesn't download an app while the other is installing
That is a good question. It is because it's based on the same package tools that apt-get and others use. These are designed in a way that expects you to provide all the packages to be installed, and then the rest is automatic. This is very good in most cases, but for the Software Center, it causes some issues. You would either need to first select the packages you want to install and then click a button to actually download and install them, or you have to queue applications and then download and install one by one. This provides a much better user experience if you're installing one application than having to use those extra clicks, but it is also annoying when you're "shopping".
It is possible to fix this, so I expect that in the future, this will be remedied, but it does mean recreating or rewriting existing tools, so I don't think it'll have very high priority.
Let me elaborate:
A package may depend on other packages. If these packages aren't available, then the package cannot be installed. So tools like apt-get will first download all the packages you ask for and all the packages they depend on, etc, and then install all of them. So you would then normally provide all the packages you wanted in one go, and they would first be downloaded and then installed.
When you choose to install an application in the software center, you'll usually want it to start downloading and installing immediately. But in order to ensure that everything is in order, only one installation can be done at any one time. That's why when you install an application, you have to wait until that application is completely downloaded and installed before the next download and install can begin.
This could be fixed by not using apt-get to install the packages, but instead downloading the packages manually and then using dpkg to install them once they're ready. You still wouldn't be able to install two packages simultaneously, but you would be able to start downloading new packages while the previously started installations were finishing. In some cases, that would save quite some time, so it is a good idea. But in most cases, it wouldn't really matter so the effort is better focused elsewhere.
you can only install one package at the time with
This will install both
Also when you update your system with
Windows behaves similarly using the "official" (MSI) installer
Packages that use the official Windows installer (MSI) WILL REFUSE to run more than one instance at a time. That's because the MSI installer database is similar to
But a lot of Windows packages use third-party installers like Installshield, NSIS, etc. which will run alongside each other because they do not need to access/modify the MSI database. Similarly, in Linux/Ubuntu, no one's stopping you from running an
First, let it be known that this answer is from what I've gleaned from my experiences with
It's a limit of the design of the underlying software.
Part of the
What happens when you install software? What happens is it starts
And when that happens, a lock kicks in. Once you add more than one package to be installed, what happens next is it waits until the first one is done before it starts the next
Some actions, like refreshing the menu's, indexing fonts and reconfiguring the libraries need to happen only once if all packages are installed at the same time. A second advantage hopefully shouldn't happen often, but if you want to install packages which exclude eachother you know it prior to downloading all of them.
A last advantage is mostly important when you install or upgrade many packages at once: if questions have to be answered, they will all come after eachother during the install progress. So you can keep working instead of being bugged every 5 minutes by a different question.
The reason that two instances of apt-get cannot operate simultaneously is because the application is reading/writing several files critical for the system operation. Reading or writing a file by an apt-get operation, while another is performing the same operations on it will lead to problems of bad configuration and/or damage of the files. So when an apt-get operation occurs, it "locks" the files it needs so another operation cannot be executed simultaneously, a.k.a. it raises a flag that tells the other operations that the files are currently in use.
However, simultaneous downloads of the files needed by apt (or rather download from a number of sources) are possible with the command apt-fast
simple way to installing several file in one time, follow these steps
wait untill the installation finish.