[R] How to install this package

Enrico Schumann e@ @end|ng |rom enr|co@chum@nn@net
Tue Oct 1 13:29:57 CEST 2024


On Wed, 25 Sep 2024, Christofer Bogaso writes:

> Hi,
>
> I would like to install an R library from
> https://cran.r-project.org/src/contrib/Archive/termstrc/
>
> I executed below code without success.
>
> Any help would be appreciated.
>
>> install.packages('/Users/termstrc_1.3.tar.gz', repos = NULL, type="source")
>
> * installing *source* package ‘termstrc’ ...
>
> ** using staged installation
>
> ** libs
>
> using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.3)’
>
> using SDK: ‘MacOSX15.0.sdk’
>
> clang++ -arch arm64 -std=gnu++17
> -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> -I'/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Rcpp/include'
> -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2
> -c objfcts.cpp -o objfcts.o
>
> clang++ -arch arm64 -std=gnu++17 -dynamiclib
> -Wl,-headerpad_max_install_names -undefined dynamic_lookup
> -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o
> termstrc.so objfcts.o -F/Library/Frameworks/R.framework/.. -framework
> R -Wl,-framework -Wl,CoreFoundation
>
> installing to /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-termstrc/00new/termstrc/libs
>
> ** R
>
> ** data
>
> ** demo
>
> ** byte-compile and prepare package for lazy loading
>
> Error in dyn.load(dynlib <- getDynlib(dir)) :
>
>   unable to load shared object
> '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rgl/libs/rgl.so':
>
>   dlopen(/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rgl/libs/rgl.so,
> 0x0006): Library not loaded: /opt/X11/lib/libGLU.1.dylib
>
>   Referenced from: <C90BFE0D-3008-3759-8DC8-B7FD5F3D934B>
> /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rgl/libs/rgl.so
>
>   Reason: tried: '/opt/X11/lib/libGLU.1.dylib' (no such file),
> '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libGLU.1.dylib' (no
> such file), '/opt/X11/lib/libGLU.1.dylib' (no such file),
> '/Library/Frameworks/R.framework/Resources/lib/libGLU.1.dylib' (no
> such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libGLU.1.dylib'
> (no such file)
>
> ERROR: lazy loading failed for package ‘termstrc’
>
> * removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/termstrc’
>
> Warning message:
>
> In install.packages("/Users/termstrc_1.3.tar.gz",  :
>
>   installation of package ‘/Users/termstrc_1.3.tar.gz’ had non-zero exit status
>

Is there a reason why you want version 1.3, when a (newer)
version 1.3.7 is available (in the sense of "archived on
CRAN") as well?  This "newer" version is still more than 10
years old.  But for what it is worth, I can install this
version on Ubuntu 24.04, with R 4.4.1.

In case you need only specific functionality from the
package, you might be able to extract those bits either from
the archived tarball, or from the source code at

  https://r-forge.r-project.org/scm/viewvc.php/pkg/?root=termstrc


good luck!

-- 
Enrico Schumann
Lucerne, Switzerland
https://enricoschumann.net



More information about the R-help mailing list