close

https://www.796t.com/p/126645.html

解決package ~ is not configured yet

 

Linux強制安裝某些軟體後會導致一些問題,如下是我遇到的:

dpkg: error processing package libnss-winbind:amd64 (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-winbind:amd64:
libpam-winbind:amd64 depends on samba-common (= 2:4.3.11+dfsg-0ubuntu0.14.04.10); however:
Package samba-common is not configured yet.
libpam-winbind:amd64 depends on winbind (= 2:4.3.11+dfsg-0ubuntu0.14.04.10); however:
Package winbind is not configured yet.

 

dpkg: error processing package libpam-winbind:amd64 (–configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of smbclient:
smbclient depends on samba-common (= 2:4.3.11+dfsg-0ubuntu0.14.04.10); however:
Package samba-common is not configured yet.

 

dpkg: error processing package smbclient (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libssl1.0.0:i386
samba-common
samba-common-bin
samba
winbind
libnss-winbind:amd64
libpam-winbind:amd64
smbclient

\

 

 

 

 

 

 

解決方法是:
1、sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
2、sudo mkdir /var/lib/dpkg/info/
3、sudo apt-get update
4、sudo apt-get -f install

 

 

 

實際測試

錯誤的狀況

Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
 installed samba-common-bin package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of samba:
 samba depends on samba-common-bin (= 2:4.15.5~dfsg-0ubuntu5.1); however:
  Package samba-common-bin is not configured yet.

dpkg: error processing package samba (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 samba-common-bin
 samba

 

輸入解決方案
root@iei-Precision-3640-Tower:/etc# mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
root@iei-Precision-3640-Tower:/etc# mkdir /var/lib/dpkg/info/
root@iei-Precision-3640-Tower:/etc# apt-get update
Hit:1 http://tw.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://tw.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://tw.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 https://download.sublimetext.com apt/stable/ InRelease
Reading package lists... Done
W: https://download.sublimetext.com/apt/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
root@iei-Precision-3640-Tower:/etc# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up samba-common-bin (2:4.15.5~dfsg-0ubuntu5.1) ...
Setting up samba (2:4.15.5~dfsg-0ubuntu5.1) ...
Processing triggers for ufw (0.36.1-4build1) ...

 

可以 安裝了
root@iei-Precision-3640-Tower:/etc# aptitude -y install samba-common-bin
samba-common-bin is already installed at the requested version (2:4.15.5~dfsg-0ubuntu5.1)
samba-common-bin is already installed at the requested version (2:4.15.5~dfsg-0ubuntu5.1)
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

root@iei-Precision-3640-Tower:/etc#
 

arrow
arrow
    全站熱搜

    立你斯 發表在 痞客邦 留言(0) 人氣()