Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsodium not found although installed #18

Open
markheckmann opened this issue Oct 30, 2019 · 4 comments
Open

libsodium not found although installed #18

markheckmann opened this issue Oct 30, 2019 · 4 comments

Comments

@markheckmann
Copy link

markheckmann commented Oct 30, 2019

On a Linux AWS instance, I installed libsodium and the R sodium package without errors. However, when loading sodium I get (sorry for the non-reproducable example):

> library(sodium)
Error: package or namespace load failed for ‘sodium’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/lib64/R/library/sodium/libs/sodium.so':
  libsodium.so.23: cannot open shared object file: No such file or directory

The .so file is there however:

> system("ls /usr/lib64/R/library/sodium/libs")
sodium.so

And so is libsodium:

> head(system("sudo find / -iname libsodium.*"))
/usr/local/lib/libsodium.a
/usr/local/lib/libsodium.la
/usr/local/lib/libsodium.so.23.3.0
/usr/local/lib/libsodium.so
/usr/local/lib/pkgconfig/libsodium.pc
/usr/local/lib/libsodium.so.23
/home/ec2-user/libsodium-1.0.18/libsodium.vcxproj.filters

Any ideas?

@jeroen
Copy link
Member

jeroen commented Oct 30, 2019

Did you install libsodium from source? It's better to use the system provided sodium. For example on CentOS you do:

yum install epel-release
yum install libsodium-devel

@markheckmann
Copy link
Author

markheckmann commented Oct 30, 2019

I tried that, but it said:

[ec2-user@xxx]$ sudo yum install libsodium-devel
Loaded plugins: priorities, update-motd, upgrade-helper
No package libsodium-devel available.

So I used the source as I did not know how to make the provided sodium release available (linux rookie) PS. on EC2 Linux AMI

PSS: Might be a lack of whitelisting here. I will check and talk to the admins before I can retry to install the system version. I will get back to this as soon as I have done that.

@jeroen
Copy link
Member

jeroen commented Oct 30, 2019

Did you install epel-release? libsodium is part of EPEL, not the regular EL repositories.

If you want to use your custom libsodium from /usr/local/lib, you need to set LD_LIBRARY_PATH when starting R.

@markheckmann
Copy link
Author

Not being able to update the EPEL repolist was a proxy issue. By adding the line proxy=<your proxy> to /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo it worked to install libsodium by sudo yum install libsodium. However, the version I got know appears to be old, i.e.

/usr/lib64/libsodium.so.4.5.0
/usr/lib64/libsodium.so.4
/usr/lib64/libsodium.so

Any hints for EPEL / linux noobs how to get the latest one from EPEL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants