Debian aptitude install: 'find' not found in PATH or not executable - find

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?

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.

Related

No way to update python3.10 on my linux mint mate 20.3 Una

Last night the update manager indicates there are 2 update ready. I want to apply them but at the end only one updates the 2nd one (python 3.10) does not. It was late so went to bed. This morning that update is still there but now there is some more stuff.
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
It was not exactly the same as mine related to codelite. I looked in repositories and ppa´s and found an entry for codelite and disabled it. That message was gone. But the update still did not work. This time a problem with the mirror I was using. Changed mirror and all the rest runs fine. Still updating python 3.10 no way. Other updates do pass, even python 3.8 and 3.9. Clearly the problem lies with python 3.10 and seem dependency related but I am stumped.
The deadsnakes repository is there. I removed and reinstalled it. Still same problem.
Here is a screen shoot of my terminal (same messages appear when I use synaptic):
It all turn around two dependencies that python 3.10 needs but are no longer there. But the recommended commands do nothing but return the same result.
The following packages have unmet dependencies.
python3.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
So what is going wrong? what apart from focal1 and focal2 is different? And are they fundamentally different? Most importantly how do I solve this problem without going in circles.
Oh and before I forget. My python console in gedit stopped working at the same time as these problems started and I can't make out what the problem there is either. Suspect though they are related. e
Thank you in advance.
Here is how I solved the same issue in Ubuntu 20.04
Locate package libpython3.10-stdlib
$ apt-cache policy libpython3.10-stdlib
libpython3.10-stdlib:
Installed: 3.10.4-1+focal1
Candidate: 3.10.4-1+focal2
Version table:
3.10.4-1+focal2 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
*** 3.10.4-1+focal1 100
100 /var/lib/dpkg/status
$ ls -l /var/lib/dpkg/info | grep -i libpython3.10-stdlib
-rw-r--r-- 1 root root 14489 Apr 10 00:26 libpython3.10- stdlib:amd64.list
-rw-r--r-- 1 root root 23536 Mär 24 17:12 libpython3.10-stdlib:amd64.md5sums
-rwxr-xr-x 1 root root 1161 Mär 24 17:12 libpython3.10-stdlib:amd64.prerm
Remove manually the package
$ sudo mv /var/lib/dpkg/info/libpython3.10-stdlib:amd64.* /tmp
Repeat the same steps for libpython3.10-minimal. Then fix the broken packages
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpython3.10-minimal libpython3.10-stdlib
The following packages will be upgraded:
libpython3.10-minimal libpython3.10-stdlib
2 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2.566 kB of archives.
After this operation, 68,6 kB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'libpython3.10-stdlib:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpython3.10-minimal:amd64' missing; assuming package has no files currently installed
(Reading database ... 191581 files and directories currently installed.)
Preparing to unpack .../libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Preparing to unpack .../libpython3.10-minimal_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Setting up libpython3.10-minimal:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-minimal (3.10.4-1+focal2) ...
Setting up libpython3.10-stdlib:amd64 (3.10.4-1+focal2) ...
Setting up libpython3.10:amd64 (3.10.4-1+focal2) ...
Setting up python3.10 (3.10.4-1+focal2) ...
Setting up libpython3.10-dev:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-dev (3.10.4-1+focal2) ...
I had the same error. I followed the instructions in the first and second answer and I got this:
/var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
After move this :
sudo mv /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb /tmp
It works !
Same thing happened to me. When apt fails I go for https://pkgs.org/, search the package, download and install manually. It usually works.

Problam with apt-get install

I'm using ubuntu 16.04 and last week I try to install some virtual machine on my computer but I failed to do it.
Now when I try to install any program from the apt-get install I got this text:
sudo apt-get install build-essential git libssl-dev
[sudo] password for eliya:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
git is already the newest version (1:2.7.4-0ubuntu1.5).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.13).
The following packages were automatically installed and are no longer required:
libavdevice-ffmpeg56 linux-headers-4.4.0-134 linux-headers-4.4.0-134-generic
linux-image-4.4.0-134-generic linux-image-extra-4.4.0-134-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox-ext-pack (5.1.38-0ubuntu1.16.04.1) ...
removing old virtualbox extension packs
virtualbox-ext-pack: downloading: http://download.virtualbox.org/virtualbox/5.1.38/Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack
The file will be downloaded into /usr/share/virtualbox-ext-pack
License accepted.
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/usr/share/virtualbox-ext-pack/Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack"
VBoxManage: error: The installer failed with exit code 1: VBoxExtPackHelperApp: error: World writable: '/usr'
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1201 of file VBoxManageMisc.cpp
Hash mismatch Oracle_VM_VirtualBox_Extension_Pack-5.1.38.vbox-extpack: expected e93d87b0f5de50369baca0a48082236b947df5b922ffd0233c0fa92c1206defd, or wrong accept-license key, removing the file.
dpkg: error processing package virtualbox-ext-pack (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
virtualbox-ext-pack
E: Sub-process /usr/bin/dpkg returned an error code (1)
And now i can't install anything because this problam.
Thank you
1.Reconfigure Package Database
sudo dpkg --configure -a
2.force install
sudo apt-get install -f
Then try again installing virtualbox

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

I am cross compiling a Lazarus program, creating a 32bit program on a 64bit Ubuntu 14.04 Trusty Tahr system, and everything apparently compiles to the very end when I get this messsage
/usr/bin/ld: cannot find -lglib-2.0
What is the full name of the library whose absence results in this error mesage?
libc6-dev:i386 appears to be the most likely library, but when I try to install it with apt indicates build-essential g++ gcc gcc-multilib will be removed so I abort it.
sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-libc-dev linux-libc-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386
The following packages will be REMOVED
build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
It turns out it was the libglib2.0-0:i386 package. It was already installed earlier, but it had not been fully configured.
It was present in the /lib/i386-linux directory and I had to create a symlink to it include it to the fpc.cfg configuration file used by Free Pascal.
locate libglib | grep ^/lib produced:
/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0
I symlinked it with the expected name:
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
then added to the Lazarus installations fpc.cfg file
#ifdef cpui386
-Fl/usr/lib32
-Fl/lib/i386-linux-gnu
#endif

Sub-process /usr/bin/dpkg returned an error code (1)

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
cordova-ubuntu-2.8-examples
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
mongodb-10gen
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/87.1 MB of archives.
After this operation, 221 MB of additional disk space will be used.
(Reading database ... 250020 files and directories currently installed.)
Unpacking mongodb-10gen (from .../mongodb-10gen_2.4.8_i386.deb) ...
Obsolete conffile /etc/init.d/mongodb has been modified by you, renaming to .dpkg-bak
dpkg: error processing /var/cache/apt/archives/mongodb-10gen_2.4.8_i386.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-10gen-unstable-mongos 2.5.2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-10gen_2.4.8_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
please see here! worked for me:
install mongodb-10gen failed with apt-get
A bug here https://jira.mongodb.org/browse/SERVER-6910
apt-get remove mongodb-clients
and then the installation of mongodb-10gen should work.

Yum error on Centos 6.4

Yum suddenly start to give the error pasted bellow
I tried to rebuild yum, but the error remains. I re-installed krb5-libs, but the error remains
How can I repair yum without reinstating Centos?
Error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libkrb5.so.3: symbol krb5int_push_fscreatecon_for, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
At my machine the issue was caused by a second libkrb5support.so distributed with PostgreSQL 5.2 / PSqlODBC. After commenting the library path in /etc/ld.so.conf.d/psqlODBC.conf and runing ldconfig -v, I can run yum again without any issue.
In my case, the path to the "wrong" library is /opt/PostgreSQL/9.2/lib/libkrb5support.so.0
Edgar.
I encountered this error after defining LD_LIBRARY_PATH environment variable. It was fixed by adding /lib and /lib64 to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/lib:/lib64:....
Run the below command to test what all the libraries you have:
# ldd /lib64/libkrb5.so.3
And make sure that the module 'libkrb5support.so.0' is available under '/lib64' directory or having the soft ink to the files that is inside /lib64 directory. If its not there then this error is expected. So manually you have to link it again.
From my test system:
# locate libkrb5support.so.0
/lib64/libkrb5support.so.0
# ls -l /lib64/libkrb5support.so.0
lrwxrwxrwx. 1 root root 21 Aug 19 15:52 /lib64/libkrb5support.so.0 -> libkrb5support.so.0.1
# ls -l /lib64/libkrb5support.so.0.1
-rwxr-xr-x. 1 root root 46336 May 1 2012 /lib64/libkrb5support.so.0.1