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

Install on Ubuntu 24.04 failed #15

Open
Marc-Girondot opened this issue Aug 19, 2024 · 1 comment
Open

Install on Ubuntu 24.04 failed #15

Marc-Girondot opened this issue Aug 19, 2024 · 1 comment

Comments

@Marc-Girondot
Copy link

System: Ubuntu 24.04
R 4.4.1

In R:

devtools::install_github("thomasp85/transformr")

It returns an error (all the logs are at the end of this report):
Erreur dans dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/usr/local/lib/R/site-library/sf/libs/sf.so' :
libgdal.so.32: cannot open shared object file: No such file or directory

Indeed, I have the last version of libgdal.so installed which is version 34:
mgirond@caretta:~$ cd /usr/lib/x86_64-linux-gnu
mgirond@caretta:/usr/lib/x86_64-linux-gnu$ ls -a libgdal*
libgdal.so libgdal.so.34 libgdal.so.34.3.8.4

Using a hack to symlink 34 to 32 does not work either:
sudo ln -s /usr/lib/x86_64-linux-gnu/libgdal.so /usr/lib/x86_64-linux-gnu/libgdal.so.32

will return:
Erreur dans dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/usr/local/lib/R/site-library/sf/libs/sf.so' :
/usr/local/lib/R/site-library/sf/libs/sf.so: undefined symbol: _ZN18OGRGeometryFactory13createFromWkbEPKvP19OGRSpatialReferencePP11OGRGeometrym13OGRwkbVariant

All the logs are here:

devtools::install_github("thomasp85/transformr")
Downloading GitHub repo thomasp85/transformr@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/tmp/RtmpaALtTp/remotes85b47a4fd5/thomasp85-transformr-0f7262d/DESCRIPTION’ (361ms)
─ preparing ‘transformr’:
✔ checking DESCRIPTION meta-information
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘transformr_0.1.5.9000.tar.gz’

Installation du package dans ‘/usr/local/lib/R/site-library’
(car ‘lib’ n'est pas spécifié)

  • installing source package ‘transformr’ ...
    ** using staged installation
    ** libs
    using C++ compiler: ‘g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0’
    g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-avGvPq/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c align_rings.cpp -o align_rings.o
    g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-avGvPq/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c cpp11.cpp -o cpp11.o
    g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-avGvPq/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c fill_down.cpp -o fill_down.o
    g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I'/usr/lib/R/site-library/cpp11/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-avGvPq/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c sf_packing.cpp -o sf_packing.o
    g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o transformr.so align_rings.o cpp11.o fill_down.o sf_packing.o -L/usr/lib/R/lib -lR
    installing to /usr/local/lib/R/site-library/00LOCK-transformr/00new/transformr/libs
    ** R
    ** byte-compile and prepare package for lazy loading
    Erreur dans dyn.load(file, DLLpath = DLLpath, ...) :
    impossible de charger l'objet partagé '/usr/local/lib/R/site-library/sf/libs/sf.so' :
    libgdal.so.32: cannot open shared object file: No such file or directory
    Appels : ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
    Exécution arrêtée
    ERROR: lazy loading failed for package ‘transformr’
  • removing ‘/usr/local/lib/R/site-library/transformr’
    Message d'avis :
    Dans i.p(...) :
    l'installation du package ‘/tmp/RtmpaALtTp/file85b705d3294/transformr_0.1.5.9000.tar.gz’ a eu un statut de sortie non nul

mgirond@caretta:~$ cd /usr/lib/x86_64-linux-gnu
mgirond@caretta:/usr/lib/x86_64-linux-gnu$ ls -a libgdal*
libgdal.so libgdal.so.34 libgdal.so.34.3.8.4

mgirond@caretta:/usr/lib/x86_64-linux-gnu$ sudo ln -s /usr/lib/x86_64-linux-gnu/libgdal.so /usr/lib/x86_64-linux-gnu/libgdal.so.32

Erreur dans dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/usr/local/lib/R/site-library/sf/libs/sf.so' :
/usr/local/lib/R/site-library/sf/libs/sf.so: undefined symbol: _ZN18OGRGeometryFactory13createFromWkbEPKvP19OGRSpatialReferencePP11OGRGeometrym13OGRwkbVariant
Appels : ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Exécution arrêtée

@The-Dub
Copy link

The-Dub commented Aug 21, 2024

Hi,

I got a similar issue installing transformr on a docker container.

  • for error : unable to load shared object '/usr/local/lib/R/site-library/units/libs/units.so': libudunits2.so.0:
    then run in terminal sudo apt-get install -y libudunits2-dev

  • for error : unable to load shared object '/usr/local/lib/R/site-library/sf/libs/sf.so': libproj.so.22:
    then run in terminal sudo apt-get install libproj-dev

  • for error : unable to load shared object '/usr/local/lib/R/site-library/sf/libs/sf.so': libgdal.so.30:
    then run in terminal sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev (similar as this issue)

hope this helps!

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