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가 이전에 사라진 것이 걱정되고 실수로 삭제하지 않았다면 시스템이 해킹되었을 수 있습니까?

관련 정보