0

When I try to install any package such as php5, it gives me this error. I did update and upgrade all libraries.

root@host:~# apt-get install apache2-mpm-prefork libapache2-mod-php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2-mpm-prefork is already the newest version.
The following extra packages will be installed:
  libonig2 libqdbm14 php5-cli php5-common
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/6,106 kB of archives.
After this operation, 18.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: delaying package configuration, since apt-utils is not installed
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)

Can someone help me?

Kriesel
  • 3
  • 1
  • 2
  • Does entering `sudo which find` in your terminal return anything? And `sudo echo $PATH`? – Qurben May 16 '13 at 21:00
  • I do not have the sudo command why I use Debian... root@host:~# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin – Kriesel May 17 '13 at 09:56

1 Answers1

1

There is probably something messed up with the permissions of find, find on your installation is probably located in /usr/bin/find, to check the permissions of this application run

ls -l /usr/bin/find

This should return something like this:

-rwxr-xr-x 1 root root 136152 Oct 26  2010 /usr/bin/find

If this returns an error, try to ls find on other locations in you path (eg. /bin/find, /usr/local/sbin/find)

The first part should be identical for the command to work. If not, reset the permissions to with the following command:

chmod 755 /usr/bin/find

This should fix it.

Qurben
  • 1,276
  • 1
  • 10
  • 21
  • Return this: root@host:~# ls -l /usr/bin/find lrwxrwxrwx 1 root root 16 May 16 22:41 /usr/bin/find -> /usr/bin/oldfind root@host:~# chmod 755 /usr/bin/find chmod: cannot operate on dangling symlink `/usr/bin/find' – Kriesel May 17 '13 at 13:10
  • What are the permissions of /usr/bin/oldfind? – Qurben May 17 '13 at 13:27
  • ls -l /usr/bin/oldfind ls: cannot access /usr/bin/oldfind: No such file or directory – Kriesel May 17 '13 at 13:36
  • 1
    This means that there is no program called find on your machine, the only thing I can think of is to copy a working version of find to your machine, this could cause some instability. You could always reinstall Debian, it is part of the learning process – Qurben May 17 '13 at 13:43
  • I solved it by making a copy of "find" from the debian installed on virtualbox and after type this command: dpkg -i findutils_4.4.2-4_amd64.deb – Kriesel May 18 '13 at 13:46