7

I would just like to know the reason.

3 Answers 3

14

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

1
  • If you look at the RPM based distributions, you see the same behavior if you try to run concurrent rpm operations. Sep 19, 2010 at 2:37
4

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.

2

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" ;-)

You must log in to answer this question.