パッケージのインストール中にdpkg-preconfigureで構文が発生し、見つからないエラーが発生します。

パッケージのインストール中にdpkg-preconfigureで構文が発生し、見つからないエラーが発生します。

私は修正されたrootfs(私が作成したものではない)を持つDebian Stretch 9.3イメージを持っており、グラフィック環境の増加を防ぐために通常より少ない数のパッケージを持っています。

新しいパッケージのインストールを妨げる要因が何であるかを調べたいと思います。

以下はサンプル出力です。

root@var-som-mx7:~# apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates libcurl3 libidn2-0 libnghttp2-14 libpsl5 librtmp1
  libunistring0 openssl publicsuffix
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libidn2-0 libnghttp2-14 libpsl5 librtmp1
  libunistring0 openssl publicsuffix
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,956 kB of archives.
After this operation, 4,052 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.ch.debian.org/debian stretch/main armhf openssl armhf 1.1.0f-3+deb9u2 [703 kB]
Get:2 http://ftp.ch.debian.org/debian stretch/main armhf ca-certificates all 20161130+nmu1+deb9u1 [182 kB]
Get:3 http://ftp.ch.debian.org/debian stretch/main armhf libunistring0 armhf 0.9.6+really0.9.3-0.1 [255 kB]
Get:4 http://ftp.ch.debian.org/debian stretch/main armhf libidn2-0 armhf 0.16-1+deb9u1 [58.8 kB]
Get:5 http://ftp.ch.debian.org/debian stretch/main armhf libnghttp2-14 armhf 1.18.1-1 [69.1 kB]
Get:6 http://ftp.ch.debian.org/debian stretch/main armhf libpsl5 armhf 0.17.0-3 [40.7 kB]
Get:7 http://ftp.ch.debian.org/debian stretch/main armhf librtmp1 armhf 2.4+20151223.gitfa8646d.1-1+b1 [55.1 kB]
Get:8 http://ftp.ch.debian.org/debian stretch/main armhf libcurl3 armhf 7.52.1-5+deb9u8 [264 kB]
Get:9 http://ftp.ch.debian.org/debian stretch/main armhf curl armhf 7.52.1-5+deb9u8 [223 kB]
Get:10 http://ftp.ch.debian.org/debian stretch/main armhf publicsuffix all 20181003.1334-0+deb9u1 [104 kB]
Fetched 1,956 kB in 1min 2s (31.2 kB/s)
/usr/sbin/dpkg-preconfigure: 6: /usr/sbin/dpkg-preconfigure: BEGIN: not found
/usr/sbin/dpkg-preconfigure: 1: eval: qq{: not found
/usr/sbin/dpkg-preconfigure: 8: /usr/sbin/dpkg-preconfigure: use: not found
/usr/sbin/dpkg-preconfigure: 9: /usr/sbin/dpkg-preconfigure: use: not found
/usr/sbin/dpkg-preconfigure: 10: /usr/sbin/dpkg-preconfigure: Syntax error: "(" unexpected
Selecting previously unselected package openssl.
(Reading database ... 18795 files and directories currently installed.)
Preparing to unpack .../0-openssl_1.1.0f-3+deb9u2_armhf.deb ...
Unpacking openssl (1.1.0f-3+deb9u2) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../1-ca-certificates_20161130+nmu1+deb9u1_all.deb ...
Unpacking ca-certificates (20161130+nmu1+deb9u1) ...
Selecting previously unselected package libunistring0:armhf.
Preparing to unpack .../2-libunistring0_0.9.6+really0.9.3-0.1_armhf.deb ...
Unpacking libunistring0:armhf (0.9.6+really0.9.3-0.1) ...
Selecting previously unselected package libidn2-0:armhf.
Preparing to unpack .../3-libidn2-0_0.16-1+deb9u1_armhf.deb ...
Unpacking libidn2-0:armhf (0.16-1+deb9u1) ...
Selecting previously unselected package libnghttp2-14:armhf.
Preparing to unpack .../4-libnghttp2-14_1.18.1-1_armhf.deb ...
Unpacking libnghttp2-14:armhf (1.18.1-1) ...
Selecting previously unselected package libpsl5:armhf.
Preparing to unpack .../5-libpsl5_0.17.0-3_armhf.deb ...
Unpacking libpsl5:armhf (0.17.0-3) ...
Selecting previously unselected package librtmp1:armhf.
Preparing to unpack .../6-librtmp1_2.4+20151223.gitfa8646d.1-1+b1_armhf.deb ...
Unpacking librtmp1:armhf (2.4+20151223.gitfa8646d.1-1+b1) ...
Selecting previously unselected package libcurl3:armhf.
Preparing to unpack .../7-libcurl3_7.52.1-5+deb9u8_armhf.deb ...
Unpacking libcurl3:armhf (7.52.1-5+deb9u8) ...
Selecting previously unselected package curl.
Preparing to unpack .../8-curl_7.52.1-5+deb9u8_armhf.deb ...
Unpacking curl (7.52.1-5+deb9u8) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../9-publicsuffix_20181003.1334-0+deb9u1_all.deb ...
Unpacking publicsuffix (20181003.1334-0+deb9u1) ...
Setting up libnghttp2-14:armhf (1.18.1-1) ...
Setting up librtmp1:armhf (2.4+20151223.gitfa8646d.1-1+b1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up publicsuffix (20181003.1334-0+deb9u1) ...
Setting up libunistring0:armhf (0.9.6+really0.9.3-0.1) ...
Setting up openssl (1.1.0f-3+deb9u2) ...
Setting up ca-certificates (20161130+nmu1+deb9u1) ...
/usr/share/debconf/frontend: 5: /usr/share/debconf/frontend: use: not found
/usr/share/debconf/frontend: 6: /usr/share/debconf/frontend: use: not found
/usr/share/debconf/frontend: 7: /usr/share/debconf/frontend: use: not found
/usr/share/debconf/frontend: 8: /usr/share/debconf/frontend: Syntax error: "(" unexpected
dpkg: error processing package ca-certificates (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up libidn2-0:armhf (0.16-1+deb9u1) ...
Setting up libpsl5:armhf (0.17.0-3) ...
Setting up libcurl3:armhf (7.52.1-5+deb9u8) ...
Setting up curl (7.52.1-5+deb9u8) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
 ca-certificates
E: Sub-process /usr/bin/dpkg returned an error code (1)

どのパッケージをインストールしようとしても、BEGIN: not foundなどのエラーが発生します。Syntax error: "(" unexpected

systemd-analyze blameと作業画像の出力を比較してみましたsystemd-analyze critical-chainが、これまで奇妙な点は見えません。

ベストアンサー1

/usr/bin/perlシステムが何らかの方法で破損しています。これは、「必須」とマークされた perl-base パッケージで提供されます。これらのツールは、意図的に「基本」パッケージを削除するのを難しくします。誰かが「グラフィック」パッケージであるため、「基本」パッケージを削除するのが難しい場合は、xemに説明できます。これこれを行うのが間違った理由は次のとおりです。

おすすめ記事