Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would just like to know the reason.

share|improve this question

3 Answers 3

up vote 14 down vote accepted

Synaptic is just a graphical front-end to APT (Debian's package manager: Advanced Packaging Tool).

APT automatically locks one of a few special files (/var/lib/dpkg/lock among others) as it runs any operation. It is theoretically possible to programme APT to allow for concurrent processes to modify the package database. However, in practise, it is difficult to do so without risking corruption. Since most users don't need to use the packaging tool in this way, the developers have decided to disallow concurrency by implementing a lock.

If you want to install several packages at once, you can do this by ticking all of those packages in Synaptic, or listing them on the command-line, like this: sudo apt-get install package1 package2 package3

share|improve this answer
    
If you look at the RPM based distributions, you see the same behavior if you try to run concurrent rpm operations. –  Nighthawk Sep 19 '10 at 2:37

You can run multiple instances of Synaptic. But only one of them can have administrative access. That's to prevent simultaneous modifications of the package databases, which could easily lead to them being corrupted.

You can run any number of instances of Synaptic with read-only access by typing synaptic at a command prompt.

share|improve this answer

Basically: Synaptic is working at very low level for installing/configuring software. Having two instances working at the same time, changing settings and stuff, would most probably lead to corrupted software, with unusable features - and if it is about system software, it could render your OS unusable.

Then Synaptic just can't be launched twice at the same time, to prevent such problems.

You could see it as a "security feature" ;-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.