1

I've been trying to use vim to edit some bash files. However, after I followed a tutorial to install a package needed to run sqlplus Oracle CLI command, this error started being thrown.

The tutorial I've followed: libaio.so.1: cannot open shared object file

I used ldd /usr/bin/vim command to see which dependencies vim is using and where they're pointing to.The output:

linux-vdso.so.1 (0x00007ffe5cd04000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ed56fa000)

libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f6ed56ca000)

libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f6ed569f000)

libcanberra.so.0 => /lib/x86_64-linux-gnu/libcanberra.so.0 (0x00007f6ed568c000)

libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f6ed5681000)

libgpm.so.2 => /lib/x86_64-linux-gnu/libgpm.so.2 (0x00007f6ed547b000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6ed5473000)

libpython3.8.so.1.0 => /lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f6ed4f1d000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6ed4efa000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ed4d08000)

/lib64/ld-linux-x86-64.so.2 (0x00007f6ed5b32000)

libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f6ed4c78000)

libvorbisfile.so.3 => /lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f6ed4c6d000)

libtdb.so.1 => /lib/x86_64-linux-gnu/libtdb.so.1 (0x00007f6ed4c51000)

libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f6ed4c46000)

libexpat.so.1 => /u01/app/oracle/product/12.1.0/client_1/lib/libexpat.so.1(0x00007f6ed4a23000)

libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f6ed4a07000)

libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f6ed4a02000)

libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f6ed49d2000)

libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f6ed49c5000)

I think the error is due to this libexpat.so.1 => /u01/app/oracle/product/12.1.0/client_1/lib/libexpat.so.1(0x00007f6ed4a23000) line, because the libexpat.so.1 file is pointing to an environment I've just installed (oracle instant client), which owns its own environment.

What could I do to solving this? Which may be the reason?

ilwl
  • 35
  • 1
  • 6
  • (i) Version 12.1 is very old. You could almost certainly install a newer version - it will connect to older (and newer) Oracle Database versions (ii) You seem to have install the 'full' client. Why not install Instant Client which is a zip ZIP install? https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html Check the instructions at the foot of the download page. – Christopher Jones Apr 24 '22 at 22:33
  • Hey! Thanks for the answer. I don't know exactly what would distinguish a 'full' client from the Instant Client. When I 'installed' this 12.1 client, I just unziped it in root directory and set the environment variables, nothing much. I'm using this version for reasons of compatibility between the database server version and the client; even if it'd connect without problems, an error could happen since both versions would be different. – ilwl Apr 25 '22 at 13:59
  • I solved this error just turning the `libexpat.so.1` file 'invisible' (`.libexpat.so.1`) inside `/u01/app/oracle/product/12.1.0/client_1/lib` so that OS wouldn't point at it as trying to find this file, and it would point to where it's supposed to point instead. – ilwl Apr 25 '22 at 14:00

1 Answers1

1

Try looking for Oracle's possible addition to LD_LIBRARY_PATH, perhaps in .bashrc or other linux startup files. If you can find how it's altering LD_LIBRARY_PATH, try commenting it out for a vanilla default def, re-logging in, and see if vim is fixed to verify the issue.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
Polo
  • 91
  • 5