Some problems and solutions in the application of Ubuntu Apt-get dpkg

Source: Internet
Author: User

One. When installing software with sudo apt-get install, because the speed is too slow, want to change a software source, directly shut down the terminal, apt-get but the process is not finished, the result terminal prompt
: "E: Unable to get lock/var/lib/dpkg/lock–open (11: Resource temporarily unavailable)
E: Unable to lock the management directory (/var/lib/dpkg/), is there any other process that is consuming it? ”
The solution is as follows:
1 terminal input Ps-aux, list the process. Find the process containing apt '-get, direct sudo kill PID. Solve.
2 forced unlocking, command

1
2
sudo rm/var/cache/apt/archives/lock
sudo rm/var/lib/dpkg/lock


Two. Debconf:dbdriver "config":/var/cache/debconf/config.dat is locked by another process: resource temporarily unavailable

[Email protected]:~$ sudo apt-get install squid
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
Squid is already the latest version.
0 packages were upgraded, 0 new packages were installed, 0 packages were uninstalled, 272 packages were not upgraded.
There are 2 packages that are not fully installed or uninstalled.
After decompression, the extra space of 0 B is consumed.
Do you want to continue? [Y/n]y
Debconf:dbdriver "config":/var/cache/debconf/config.dat is locked by another process: resource temporarily unavailable
Setting squid (2.7.STABLE9-4UBUNTU4) ...
Debconf:dbdriver "config":/var/cache/debconf/config.dat is locked by another process: resource temporarily unavailable
DPKG: Error processing squid (--configure):
Child process installed Post-Installation script returned error number 1
The Apport report was not written because the maxreports limit has been reached.
Dpkg: Dependency issues make the GADMIN-SQUID configuration work impossible to continue:
Gadmin-squid depends on squid; however:
Package squid is not yet configured.
DPKG: Error processing Gadmin-squid (--configure):
Dependency issues-Still not configured
The Apport report was not written because the maxreports limit has been reached.
An error occurred while processing:
Squid
Gadmin-squid
E:sub-process/usr/bin/dpkg returned an error code (1)


Workaround:

[Email protected]:~$ sudo lsof/var/cache/debconf/config.dat
Lsof:WARNING:can ' t stat () Fuse.gvfs-fuse-daemon file System/home/amw/.gvfs
Output information may incomplete.
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Frontend 4250 root 4uW REG 7,0 40347 2966/var/cache/debconf/config.dat
[Email protected]:~$ sudo kill 4250
[Email protected]:~$ sudo apt-get autoclean
Reading Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
[Email protected]:~$ sudo apt-get clean
[Email protected]:~$ sudo apt-get autoremove

Some problems and solutions in the application of Ubuntu Apt-get dpkg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.