Problem installing the library on Ubuntu 20.04

Hello!
I installed the library according to the instructions in the documentation. And I ran into two problems.
The library was installed in the Home directory.
When using command

sudo make install

Everything happens fine, but when I try to build a custom project, the following error appears

./test: error while loading shared libraries: libOPENFHEbinfhe.so.1: cannot open shared object file: No such file or directory

If you use the command

make install

Then this error is thrown at the very end

CMake Error at cmake_install.cmake:46 (file):
  file INSTALL cannot set permissions on
  "/usr/local/include/openfhe/core/config_core.h": Operation not permitted.

Errors are present both in Debug and in Release

Run export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<the_path_to_your_installed_library>, and it should solve the problem.

You can also use -DCMAKE_INSTALL_PREFIX during the install top control where OpenFHE gets installed, as mentioned in the installation instructions. See CMAKE_INSTALL_PREFIX — CMake 3.29.0-rc1 Documentation for more details

I used the commands:

export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/reaneling/openfhe-development/build/lib/

export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/usr/local/lib/

It did not help

Thank you, but I did not change and did not want to change the installation location. The standard installation location suits me.

I found an error, but I don’t understand how to fix it. While executing the command, you can see this line.

Set non-toolchain portion of runtime path of "/usr/local/lib/libOPENFHEpke.so.1.1.2" to ""

It is precisely this file that the user project cannot find a link to. I tried downloading the library again - it didn’t help.
So I checked previous versions. Runs on version 1.1.0. All dependencies are installed. Custom projects work.

one more thing if you install into /usr/local/include/...
you need to have root permission, i.e. you need to su make install

@Reaneling Hi, I do not get any error linking my own (user) application with the openfhe1.1.2 libraries installed in the default location. i can try this again if you could provide your step-by-step instructions how to replicate the issue.

@Reaneling there is one more thing that could have triggered errors. If you check LD_LIBRARY_PATH after having run:

export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/home/reaneling/openfhe-development/build/lib/
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/usr/local/lib/

you will get “LD_LIBRARY_PATH:/usr/local/lib/” as the LD_LIBRARY_PATH value as the variable gets completely overwritten. The correct way of adding a new path to LD_LIBRARY_PATH is

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/reaneling/openfhe-development/build/lib/
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/

In this case LD_LIBRARY_PATH gets 2 more paths in addition to the value it had before