Install tiff, ijtiff and jpeg packages in Ubuntu and MacOSX

In terminal, first install wget to download sources of the packages. Check the most recent sources in CRAN web site.

brew install wget

For tiff packages, in MacOSX, Intel computer 

brew install libtiff

sudo ln -s  /usr/local/include/tiff.h /Library/Frameworks/R.framework/Resources/include/

sudo ln -s /usr/local/include/tiffconf.h /Library/Frameworks/R.framework/Resources/include/

sudo ln -s /usr/local/include/tiffio.h /Library/Frameworks/R.framework/Resources/include/

sudo ln -s /usr/local/include/tiffvers.h /Library/Frameworks/R.framework/Resources/include/

sudo ln -s /usr/local/lib/libtiff* /Library/Frameworks/R.framework/Resources/lib/

cd $HOME

wget https://cran.r-project.org/src/contrib/tiff_0.1-8.tar.gz

R CMD INSTALL --configure-vars='INCLUDE_DIR=/usr/local/include LIB_DIR=/usr/local/lib' tiff_0.1-8.tar.gz

rm tiff_0.1-8.tar.gz

For ijtiff

In R:

install.packages(c("checkmate", "strex", "zeallot"))

In terminal: 

wget https://cran.r-project.org/src/contrib/ijtiff_2.2.9.tar.gz 

R CMD INSTALL --configure-vars='INCLUDE_DIR=/usr/local/include LIB_DIR=/usr/local/lib' ijtiff_2.2.9.tar.gz

rm ijtiff_2.2.9.tar.gz


for MacOSX M1 computer:

wget https://cran.r-project.org/src/contrib/ijtiff_2.2.9.tar.gz 

R CMD INSTALL --configure-vars='INCLUDE_DIR=/opt/homebrew/include LIB_DIR=/opt/homebrew/lib' ijtiff_2.2.9.tar.gz

rm ijtiff_2.2.9.tar.gz


For ijtiff in ubuntu 22.04.1 (thanks to Rory Nolan for his help)

sudo apt-get install -y libwebp-dev libzstd-dev

sudo apt-get install libtiff5-dev

and in R:

install.packages("ijtiff")



For jpeg package in MacOSX:

brew install jpeg

For MacOSX intel computer

sudo ln -s /usr/local/lib/libjpeg.* /Library/Frameworks/R.framework/Resources/lib/
sudo ln -s  /usr/local/include/jpeglib.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s /usr/local/include/jconfig.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s  /usr/local/include/jmorecfg.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s  /usr/local/include/jerror.h /Library/Frameworks/R.framework/Resources/include/
cd $HOME
wget https://cran.r-project.org/src/contrib/jpeg_0.1-10.tar.gz
R CMD INSTALL jpeg_0.1-10.tar.gz
rm jpeg_0.1-10.tar.gz

for MacOSX M1 computer

sudo ln -s /opt/homebrew/lib/libjpeg.* /Library/Frameworks/R.framework/Resources/lib/
sudo ln -s /opt/homebrew/include/jpeglib.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s  /opt/homebrew/include/jconfig.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s  /opt/homebrew/include/jmorecfg.h /Library/Frameworks/R.framework/Resources/include/
sudo ln -s  /opt/homebrew/include/jerror.h /Library/Frameworks/R.framework/Resources/include/
cd $HOME
wget https://cran.r-project.org/src/contrib/jpeg_0.1-10.tar.gz
R CMD INSTALL jpeg_0.1-10.tar.gz
rm jpeg_0.1-10.tar.gz



Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04