I am experimenting
Richard Levitte
levitte at openssl.org
Sat Aug 20 08:33:21 UTC 2022
You're trying to run directly in your build tree, and haven't told the
system that /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master
is a viable directory to find your newly built shared libraries in.
Fortunately, OpenSSL has a script that can be used for such cases,
util/wrap.pl. It takes the command you want to run as arguments, sets
the appropriate environment variables for your system, then runs the
command you gave.
Example run for your example:
$ /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/util/wrap.pl \
/home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/apps/openssl version
Behind the scenes, on most Unix systems, the variable LD_LIBRARY_PATH
is set to the directory where the libraries are expected to be found.
You could do this manually if you want, like this:
$ LD_LIBRARY_PATH=/home/bullseye/test0818/openssl/3.1.0/plain/openssl-master
$ export LD_LIBRARY_PATH
$ /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/apps/openssl version
Do note, though, that setting an environment variable is permanent for
your logged in session, so it affects all commands following it, until
you change that variable again, or log out. With util/wrap.pl, it's
only being set temporarly, just for the command to be run.
Disclaimer: util/wrap.pl is fairly new, and isn't supported out of the
build folder it's used in. It's also not claimed to be stable across
OpenSSL versions, even though it has shown to be stable for some time
now. That is to say, it may change in the future... or not.
Happy experimenting!
Cheers,
Richard
On Sat, 20 Aug 2022 08:17:56 +0200,
b1bb2 at b1bb2.com wrote:
>
> To: openssl-users at openssl.org
> I am experimenting with
> https://github.com/openssl/openssl/archive/refs/heads/master.zip
> openssl 3.1.0 Source Distribution archive, I built it into a local
> virtual machine environment (folder). System is debian 11.3
> (Bullseye), Local Personal Computer.
>
> This code works:
> ls
> /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/libssl.so.3
> ls
> /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/apps/openssl
>
> This code gives error:
> /home/bullseye/test0818/openssl/3.1.0/plain/openssl-master/apps/openssl
> version
> error while loading shared libraries: libssl.so.3: cannot open shared
> object file: No such file or directory
>
> I am trying to learn (or more precisley just trying to get it working
> without errors) so please excuse my ignorance that may be apparent in
> this paragraph. My research on internet shows that error is common and
> is caused by diffrent systems having diffrent libraries or paths to
> library. So a solution is to define the correct library and correct
> path to it. But this is suposed to be a local virtual machine
> environment, Can I put the correct library into the local virtual
> machine (folder) so the software will not search for it throughout the
> global system? Or is there a general (all system) fix for this?
> Another problem is Python 3.10.6 requires a OpenSSL 1.1.1 or
> newer. Can I link my Python virtual machine to the openssl virtual
> machine? Your comments are appreciated.
>
--
Richard Levitte levitte at openssl.org
OpenSSL Project http://www.openssl.org/~levitte/
More information about the openssl-users
mailing list