%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93.png)
私は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 行に表示される実行可能ファイルがありません。
- パッケージのメタデータを一時ディレクトリに抽出します。
dpkg -e wtbuild.deb tmp
tmp/preinst
テキストエディタで開きます。- 最初の行は という文字で始まる必要があります
#!
。その後に表示されるテキストは、ファイルの実行に使用されるプログラムです。そのプログラムがありません。 - 不足しているプログラムを提供するパッケージを特定します。たとえば、プログラムが の場合
/usr/bin/python
、パッケージをインストールする必要がありますpython
。sudo apt-get install python
wtbuild.deb を保守している場合は、不足している依存関係をパッケージのcontrol
ファイルに追加する必要があります。他の誰かが wtbuild.deb を保守している場合は、不足している依存関係パッケージの名前を記載してバグレポートを提出する必要があります。