満たされていない依存関係を修正できませんでした。

満たされていない依存関係を修正できませんでした。

私のパイにSambaを設定しようとしていますが、依存関係が満たされていないため失敗します。これを出力する:

pi@octopi:~ $ sudo apt-get install samba samba-common-bin
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:
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.16-2) but 2.7.16-2+deb10u1 is to be installed
 libpython2.7-dev : Depends: libpython2.7 (= 2.7.16-2+deb10u1) but 2.7.16-2 is to be installed
 python2.7-dev : Depends: libpython2.7 (= 2.7.16-2+deb10u1) but 2.7.16-2 is to be installed
 samba : Depends: python-dnspython but it is not going to be installed
         Depends: python-samba but it is not going to be installed
         Depends: samba-common (= 2:4.9.5+dfsg-5+deb10u1+rpi1) but it is not going to be installed
         Depends: tdb-tools but it is not going to be installed
         Depends: libldb1 (>= 2:1.5.1+really1.4.6) but it is not going to be installed
         Depends: libtdb1 (>= 1.2.7+git20101214) but it is not going to be installed
         Depends: libtevent0 (>= 0.9.16) but it is not going to be installed
         Depends: samba-libs (= 2:4.9.5+dfsg-5+deb10u1+rpi1) but it is not going to be installed
         Recommends: attr but it is not going to be installed
         Recommends: samba-dsdb-modules but it is not going to be installed
         Recommends: samba-vfs-modules but it is not going to be installed
 samba-common-bin : Depends: python-samba but it is not going to be installed
                    Depends: samba-common (= 2:4.9.5+dfsg-5+deb10u1+rpi1) but it is not going to be installed
                    Depends: samba-libs (= 2:4.9.5+dfsg-5+deb10u1+rpi1) but it is not going to be installed
                    Depends: libtdb1 (>= 1.2.7+git20101214) but it is not going to be installed
                    Depends: libtevent0 (>= 0.9.9) but it is not going to be installed
                    Recommends: samba-dsdb-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

私は以下を試しました:

sudo apt --fix-broken install
sudo apt-get install -f
sudo apt-get update --fix-missing

これらは一般的にこれを出力する。出力:

pi@octopi:~ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  pigz
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libpython2.7 libpython2.7-dev
The following packages will be upgraded:
  libpython2.7 libpython2.7-dev
2 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
2 not fully installed or removed.
Need to get 0 B/31.7 MB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 47289 files and directories currently installed.)
Preparing to unpack .../libpython2.7-dev_2.7.16-2+deb10u1_armhf.deb ...
Unpacking libpython2.7-dev:armhf (2.7.16-2+deb10u1) over (2.7.16-2) ...
dpkg: error processing archive /var/cache/apt/archives/libpython2.7-dev_2.7.16-2+deb10u1_armhf.deb (--unpack):
 unable to install (supposed) new info file '/var/lib/dpkg/tmp.ci/md5sums': Is a directory
Preparing to unpack .../libpython2.7_2.7.16-2+deb10u1_armhf.deb ...
dpkg: error processing archive /var/cache/apt/archives/libpython2.7_2.7.16-2+deb10u1_armhf.deb (--unpack):
 read error in '/var/lib/dpkg/info/libpython2.7:armhf.triggers': Is a directory
Errors were encountered while processing:
 /var/cache/apt/archives/libpython2.7-dev_2.7.16-2+deb10u1_armhf.deb
 /var/cache/apt/archives/libpython2.7_2.7.16-2+deb10u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt update出力:

pi@octopi:~ $ sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
108 packages can be upgraded. Run 'apt list --upgradable' to see them.

よろしくお願いします。

ベストアンサー1

以下に基づいて試してみることができます。Ubuntuの投稿について尋ねる。もともと質問が少し異なり、DebianではなくUbuntuに関するものなので、それがあなたに役立つかどうかはわかりませんが、試してみる価値があります。

stat / /dev /varすべてのディレクトリの所有者を確認するには、実行してください。

どのディレクトリの所有者が「不明」としてリストされている場合は、次のように実行します。chown root whateverdirectory(whatdirectory を Unknown が所有するディレクトリ名に置き換えます.)

おすすめ記事