Ubuntu 14.04.2 LTS: 'find'が見つからないか、PATHで実行できません。

Ubuntu 14.04.2 LTS: 'find'が見つからないか、PATHで実行できません。

次のコマンドを使用して、いくつかのグラフィックライブラリをインストールしようとしています。

sudo apt install jpegoptim optipng

ただし、実行に失敗し、次を表示します。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  jpegoptim optipng
0 upgraded, 2 newly installed, 0 to remove and 273 not upgraded.
Need to get 0 B/208 kB of archives.
After this operation, 625 kB of additional disk space will be used.
dpkg: warning: 'find' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

findその後、次のコマンドを使用してインストールを試みました。

sudo apt-get install findutils

ただし、すでにインストールされているとマークされ、インストールが失敗します。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
findutils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 273 not upgraded.

私のファイルが空であることを確認し、/etc/environment以下を追加しました。

PATH=/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

残念ながら、これも動作しませんでした。それでも結果は次のとおりです。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  jpegoptim optipng
0 upgraded, 2 newly installed, 0 to remove and 273 not upgraded.
Need to get 0 B/208 kB of archives.
After this operation, 625 kB of additional disk space will be used.
dpkg: warning: 'find' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

.bashrcまた、以下をファイルに入れてみました。

export PATH=$PATH:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

しかし、まだPATHが間違っていると文句を言います。

ベストアンサー1

sudo apt-get --reinstall install findutils

「再インストール」オプションを使用すると、インストールしたパッケージの最新バージョンを再インストールできます。

これがうまくいっても、/usr/bin/findが以前に消えたことが心配され、誤って削除されなかった場合、システムはハッキングされた可能性がありますか?

おすすめ記事