How to revert wrong setting of path variable LD_LIBRARY_PATH

55 Views Asked by At

I erroneously override the LD_LIBRARY_PATH variable on a Ubuntu 22.04 system when I only wanted to add a new path to the variable.

Now I am looking for a way to revert my mistake. I am afraid there ist no "CMD+Z" on the command line. I do not know if other programs / install routines did use the variable but I suppose they did. For now the system seems to run stable, but I am afraid that at some point starting a program will run into problems and then I might even do not realize that this is because todays mistake.

Is there any log file where I can see, what paths where in the LD_LIBRARY_PATH variable before I altered it? If not, where should I look for the values in my last backup of the system? (I run dejadup incremental backups. They should run daily when I am connected to my local NAS but it seems the last one is 12 days old.)

I have a problem with running Lightworks on Ubuntu 22.04 getting the error message:

/usr/lib/lightworks/ntcardvt: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 

On the Lightworks support forum I found as proposed solution the command:

LD_LIBRARY_PATH=/usr/lib/lightworks

Unfortunately this did not help my origional problem, but diving deeper into the issue I found out, that I might have overridden all former paths in that path variable and should have used:

export LD_LIBRARY_PATH=/usr/lib/lightworks:$LD_LIBRARY_PATH

to make shure that existing paths in that variable are kept and my new path is only added to the variable.

I expect to find a solution to revert my mistake so that I have a stable system with all the paths needed by other programs are present in the LD_LIBRARY_PATH variable. I would be happy to get my original problem solved as well, but for the moment I gave up on that.

I followed the instruction on: https://forum.lwks.com/threads/not-working-on-ubuntu-22-04.248235/ to solve my original problem. I read (too late) the explanation to LD_LIBRARY_PATH at: https://tecadmin.net/understanding-the-ld_library_path-environment-variable/ I searched on stackoverflow for a post on revert path variable but did not found a solution.

1

There are 1 best solutions below

0
On

Ok, it seems that all the changes I made to the LD_LIBRARY_PATH variable are only temporary until the next system boot. So I got away with the scare. Hopefully