Articles

Affichage des articles du octobre, 2022

Error in install packages about libnetcdf.so.15 not found (Ubuntu 22.04.01): a solution

If you install netcdf library using: sudo apt-get install libapparmor1 libcurl4-openssl-dev netcdf-bin libnetcdf-dev udunits-bin libudunits2-dev It will install the current version of libnetcdf in  /usr/lib/x86_64-linux-gnu/ It can be seen with : cd  /usr/lib/x86_64-linux-gnu/ ls -al libnetcdf* -rw-r--r-- 1 root root    1200 sept. 29  2021 libnetcdf.settings lrwxrwxrwx 1 root root      15 sept. 29  2021 libnetcdf.so -> libnetcdf.so.19 -rw-r--r-- 1 root root 1346880 sept. 29  2021 libnetcdf.so.19 But when you try to install or update  tidync  package, it will produce an error: Erreur dans dyn.load(file, DLLpath = DLLpath, ...) :    impossible de charger l'objet partagé '/usr/local/lib/R/site-library/ncdf4/libs/ncdf4.so':   libnetcdf.so.15: cannot open shared object file: No such file or directory It search for libnetcdf.so.15 which is an outdated version. The solution is to symlink libnetcdf.so.15 with the most recent version which is itself a symlink ! sudo ln -s /us

Managing seed for random number

set.seed(423) runif(3) # [1] 0.1089715 0.5973455 0.9726307 # Save the seed oldseed <- .Random.seed runif(3) # [1] 0.7973768 0.2278427 0.5189830 # Restore the seed .Random.seed <- oldseed runif(3) # [1] 0.7973768 0.2278427 0.5189830

install most recent version of libgeos in ubuntu

First remove all previous installations of libgeos using: sudo apt remove libgeos* sudo updatedb You can also search for other installation using locate libgeos or locate geos Remove any installation or spurious ln file. Normally it will permit to remove this kind of message in R: WARNING: different compile-time and run-time versions of GEOS Compiled with:3.12.0-CAPI-1.18.0 Running with:3.10.2-CAPI-1.16.0 (check the most recent version of the lib in the web site  https://libgeos.org/usage/download/ )  If the 3.12.1 version is the most recent: wget https://download.osgeo.org/geos/geos-3.12.1.tar.bz2 tar xvfj geos-3.12.1.tar.bz2 cd geos-3.12.1 mkdir _build cd _build # Set up the build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local  .. # Run the build, test, install make ctest sudo make install After you can remove the files: cd ../.. rm -rf geos-3.12.1 rm -rf geos-3.12.1.tar.bz2  Then add this in .profile GEOS_LIBRARY_PATH='/usr/lib/x86_64-linux-gnu/lib/libgeos_c

install rerddap on ubuntu 22.04

sudo apt-get install netcdf-bin libnetcdf-dev sudo updatedb locate libnetcdf.so (copy the link) sudo ln -s /usr/lib/x86_64-linux-gnu/libnetcdf.so /usr/lib/libnetcdf.so sudo ln -s /usr/lib/x86_64-linux-gnu/libnetcdf.so /usr/lib/libnetcdf.so.15 Then in R install.packages("rerddap")