Libaio.So.1: Cannot Open Shared Object File

libaio.so.1: cannot open shared object file

It looks like a 32/64 bit mismatch. The ldd output shows that mainly libraries from /lib64 are chosen. That would indicate that you have installed a 64 bit version of the Oracle client and have created a 64 bit executable. But libaio.so is probably a 32 bit library and cannot be used for your application.

So you either need a 64 bit version of libaio or you create a 32 bit version of your application.

Cannot install MySQL - libaio.so.1: cannot open shared object file: No such file or directory - Live Installation with Persistence

After more many hours of research, i found that the problem wasn't the LiveUSB or the library itself. The problem was AppArmor, who blocked MySQL to use that library. So I disabled it:

sudo /etc/init.d/apparmor stop
sudo /etc/init.d/apparmor teardown
sudo update-rc.d -f apparmor remove

And a not-so-orthodox way, I completely removed AppArmor, to prevent future problems with:

sudo apt-get purge apparmor

Then I uninstalled and reinstalled MySQL Server flawlessy. It works!

libclntsh.so: cannot open shared object file, using Docker, Oracle, Python,

So I have been working on this for two days. And there was a part of my setup that I was over looking that turned out to be causing the issue. I'm on a Mac Mini M1 and the reason that nothing I tried worked. I was missing an important part in my Dockerfile. I needed to add --platform=linux/amd64. I didn't know this because I just switched to the Mac Mini 2 days ago and this wasn't something I needed to do before. Hopefully if someone runs into the same issue they will find this and it will help them.

Error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

If you have a parent script which calls (but does not source) two child scripts, any environment changes made by the first child script do not affect the parent or the other child.

As a simple example let's say you have an install.sh script which contains:

#!/bin/bash
install_oraclexe.sh
create_schema.sh

where install_oraclexe.sh contains the commands you showed in step c, including sourcing the environment script with . /etc/profile.d/oracle.sh; and create_schema.sh executes SQL*Plus.

Within install_oraclexe.sh the environment is modified and PATH, LD_LIBRARY_PATH, etc. are available and have values that would allow you to run SQL*Plus later in that same child script. But those environment changes are only visible to that script. When it exits and control passes back to the parent script, its environment has not been touched, and it is not aware of anything the child has done. When it then executes the create_schema.sh script it still doesn't have the Oracle-specfic environment settings, so the second child script doesn't have those either.

You can either move (or copy) the source command for the environment changes to the parent script:

#!/bin/bash
install_oraclexe.sh
. /etc/profile.d/oracle.sh
create_schema.sh

Or perhaps more neatly add it to the create_schema.sh script:

#!/bin/bash
. /etc/profile.d/oracle.sh
sqlplus ...

Presumably as you are only installing the client you are connecting to a remote DB and are already using a suitable connection string, so you don't need to export ORACLE_SID=....


Not really relevant, but extracting files from the XE client installer seems a little odd; I would consider using the easier-to-install Oracle Instant Client instead. This seems like just the kind of distribution scenario it's designed for.

libsqlplus.so: connot open shared object file : No such file or directory even though PATH contain the path

Test your Oracle client. User either sqlplus either sqlplus64 depending on your platform. In my case, I used:

$ sqlplus64 username/password@//dbhost:1521/SID

If you get the next message, then you need to instruct sqlplus to use the proper libray:

sqlplus64: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory.

To do so, first find the location of Oracle libraries. The path should be something like /usr/lib/oracle/<version>/client(64)/lib/. In my case (Ubuntu 14.04 LTS, Intel on 64-bit), it was /usr/lib/oracle/11.2/client64/lib/.

Now, add this path to the system library list. Create and edit a new file:

$ sudo nano /etc/ld.so.conf.d/oracle.conf

Add inside the path:

/usr/lib/oracle/11.2/client64/lib/

Run now the dynamic linker run-time bindings utility:

$ sudo ldconfig

If sqlplus yields of a missing libaio.so.1 file, run:

$ sudo apt-get install libaio1

For other errors when trying to run sqlplus, please consult the Ubuntu help page.



Related Topics



Leave a reply



Submit