Ошибка неудовлетворенных зависимостей (venv и surepip) при запуске erdpy-up
Пытаюсь установить
erdpy
выходит из строя со следующей ошибкой:
$ python3 erdpy-up.py
INFO:installer:Checking user.
INFO:installer:Checking Python version.
INFO:installer:Python version: sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0)
INFO:installer:Checking operating system.
INFO:installer:Operating system: linux
INFO:installer:Package [venv] or [ensurepip] not found, will be installed.
INFO:installer:Running [$ sudo apt-get install python3-venv]:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.3 is to be installed
libc6-dev : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.3 is to be installed
libnss-systemd : Depends: systemd (= 237-3ubuntu10.44)
python3-venv : Depends: python3.6-venv (>= 3.6.7-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
CRITICAL:installer:Packages [venv] or [ensurepip] not installed correctly.
Однако запуск рекомендованного
apt --fix-broken install
as не работает со следующей ошибкой:
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libc6 libc6:i386 libpam-systemd libsystemd0 libsystemd0:i386 systemd
Suggested packages:
glibc-doc glibc-doc:i386 locales:i386 systemd-container
The following packages will be upgraded:
libc6 libc6:i386 libpam-systemd libsystemd0 libsystemd0:i386 systemd
6 upgraded, 0 newly installed, 0 to remove and 161 not upgraded.
6 not fully installed or removed.
Need to get 0 B/8,838 kB of archives.
After this operation, 3,072 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 326363 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1.4_amd64.deb ...
De-configuring libc6:i386 (2.27-3ubuntu1.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb (--unpack):
new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Preparing to unpack .../libc6_2.27-3ubuntu1.4_i386.deb ...
De-configuring libc6:amd64 (2.27-3ubuntu1.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb (--unpack):
new libc6:i386 package pre-installation script subprocess returned error exit status 1
Preparing to unpack .../libpam-systemd_237-3ubuntu10.44_amd64.deb ...
Unpacking libpam-systemd:amd64 (237-3ubuntu10.44) over (237-3ubuntu10.41) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb
/var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Детали :
ОС: Ubuntu 18.04
Python: 3.6.9
1 ответ
Основная причина проблемы четко обозначена в выходных данных
fix-broken
команда:
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process
Это проблема уровня Linux, при которой блокировка этого файла уже занята другим процессом, и шаги для которой уже описаны здесь :
sudo fuser -v /var/cache/debconf/config.dat
Покажет вам, какой процесс удерживает блокировку:
USER PID ACCESS COMMAND
/var/cache/debconf/config.dat:
root 18210 F.... dpkg-preconfigu
Затем вам просто нужно записать PID и убить его так:
$ sudo kill PID
$ sudo kill -9 PID # if the first doesn't work
После выполнения этих шагов, описанных в вопросе askubuntu, вы можете запустить:
$ sudo apt-get install -f
Тогда вы можете запустить:
sudo apt --fix-broken install
И повторная попытка установки erdpy будет успешной:
$ python3 erdpy-up.py