新しいインストール前スクリプト (/var/lib/dpkg/tmp.ci/preinst) を実行できません

新しいインストール前スクリプト (/var/lib/dpkg/tmp.ci/preinst) を実行できません

私はVagrant Boxに.debファイルをインストールしようとしています。ジェネリック/ubuntu1604画像ですが、次のエラーが発生しました:

Reading package lists... Done
Building dependency tree

Reading state information... Done
Reading state information... Done

A queue based service for watching directories for files to process as per its configuration.
Do you want to install the software package? [y/N]:y
(Reading database ... 108439 files and directories currently installed.)
Preparing to unpack wtbuild.deb ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): No such file or directory
dpkg: error processing archive wtbuild.deb (--install):
 subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 wtbuild.deb

エラー

それはそのイメージでのみ発生します。同じ .deb ファイルを Linux マシン (xenial) または別の Linux イメージを持つ別の Vagrant ボックスにインストールしようとすると、.deb ファイルは正しくインストールされます。

答え1

preinst スクリプトの shebang 行に表示される実行可能ファイルがありません。

  1. パッケージのメタデータを一時ディレクトリに抽出します。dpkg -e wtbuild.deb tmp
  2. tmp/preinstテキストエディタで開きます。
  3. 最初の行は という文字で始まる必要があります#!。その後に表示されるテキストは、ファイルの実行に使用されるプログラムです。そのプログラムがありません。
  4. 不足しているプログラムを提供するパッケージを特定します。たとえば、プログラムが の場合/usr/bin/python、パッケージをインストールする必要がありますpythonsudo apt-get install python

wtbuild.deb を保守している場合は、不足している依存関係をパッケージのcontrolファイルに追加する必要があります。他の誰かが wtbuild.deb を保守している場合は、不足している依存関係パッケージの名前を記載してバグレポートを提出する必要があります。

関連情報