dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

Issue with installation #150

Closed Philmod closed 3 years ago

Philmod commented 3 years ago

I'm getting this error:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/lib/R/site-library/igraph/libs/igraph.so':
  libglpk.so.40: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘imager’

I tried to use your code from https://github.com/dahtah/imager#linux, but I'm getting this error:

sysreqs::(desc = tmp, platform = "linux-x86_64-arch-gcc", soft = FALSE)
Error: unexpected '(' in "sysreqs::("

Here is my system:

root@c0ab67da315d:/# uname --kernel-name --kernel-release --machine
Linux 5.10.26-1rodete1-amd64 x86_64
root@c0ab67da315d:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

R version 4.0.5

Thanks, Philippe

ShotaOchi commented 3 years ago

Can you install and load igraph package successfully? The error message means R can't load igraph package.

Philmod commented 3 years ago

Ah sorry about that, yes it seems like igraph library is corrupted somehow?

> library(igraph)
Error: package or namespace load failed for ‘igraph’ in get(Info[i, 1], envir = env):
 lazy-load database '/usr/local/lib/R/site-library/igraph/R/igraph.rdb' is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

I was able to fix the problem by restarting R, and reinstalling both packages.

Thanks.

salim-b commented 1 year ago

To fix the above issue on Ubuntu 22.04, this was enough:

sudo apt install libglpk-dev

I tried to use your code from https://github.com/dahtah/imager#linux, but I'm getting this error:

sysreqs::(desc = tmp, platform = "linux-x86_64-arch-gcc", soft = FALSE)
Error: unexpected '(' in "sysreqs::("

Sorry, instructions were broken. See https://github.com/dahtah/imager/pull/168 (you can view the fixed code here )