I am trying to install R package “pdftools” and encounter the following:
In file included from libqpdf/Pl_DCT.cc:1:
include/qpdf/Pl_DCT.hh:27:10: fatal error: 'jpeglib.h' file not found
#include <jpeglib.h>
^
1 error generated.
make: *** [libqpdf/Pl_DCT.o] Error 1
ERROR: compilation failed for package ‘qpdf’
I am using R version 3.3.3 on a mac with OS X 10.10.5 and can’t update my OS at the moment for a number of reasons.
I verified that the downloaded source packages are in:
/private/var/folders/t3/_mlp_5z15z9_628n5q00pw_s8d_kfs/T/RtmpnJERsz/downloaded_packages
I saw the following post:
'jpeglib.h' file not found
And ran
$ find /usr/local -name \*jpeg\* -print -name \*jpg\* -print
/usr/local/Cellar/boost/1.71.0/include/boost/gil/extension/io/jpeg
/usr/local/Cellar/boost/1.71.0/include/boost/gil/extension/io/jpeg.hpp
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/libjpeg
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Aliases/libjpeg-turbo
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpeg-archive.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpeg-turbo.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpeg.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpeginfo.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpegoptim.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpegrescan.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mjpegtools.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mozjpeg.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openjpeg.rb
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/recoverjpeg.rb
find: /usr/local/jamf: Permission denied
The file "jpeglib.h" does not seem to be listed, but I located it in: /anaconda3/pkgs/jpeg-9b-he5867d9_2/include/jpeglib.h
Based on other posts, I tried from terminal:
$ brew install boost. (Lot of installing, no errors)
$ brew doctor (Lot of installing, no errors)
$ xcode-select: error: command line tools are already installed, use "Software Update" to install updates
$ brew install cairo gobject-introspection pixman (Lot of installing, no errors)
Then rebooted and tried installing pdftools again with same result.
Also saw this post but it was completely over my head:
https://www.cocoanetics.com/2012/01/helping-xcode-find-library-headers/
Any solutions in simple steps appreciated.
Here is my session info, I couldn't include it into comments due to restriction.
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] pdftools_2.2
loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3 pillar_1.2.1 tibble_1.4.2
[5] Rcpp_1.0.1 qpdf_1.1 rlang_0.3.0.1 askpass_1.1
I just installed pdftools w/o any problem. Upgrading your R version may solve your problem.
Related
I just started with Rstudio programming and I have some issues with XLConnect.
I was able to install "XLConnect" package, then tried to load the "XLConnect" library and got an error as below.
library(XLConnect)
ERROR: package or namespace load failed for'XLconnect':
.onload failed in loadNamespace() for XLConnect, details:
Call. System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) error: ' "cat" not found.
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Switzerland.1252 LC_CTYPE=Italian_Switzerland.1252 LC_MONETARY=Italian_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Switzerland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 rJava_1.0-4
Any help would be really appreciated!
Thanks
This is a bug in XLConnect 1.0.3, where it requires cat to be installed on Windows. We fixed it in 1.0.4, so upgrading is the easiest way to fix the problem.
If for some reason you can't upgrade, you may try to install cat on Windows, e.g. using MINGW-w64.
See https://github.com/miraisolutions/xlconnect/issues/132 for the discussion.
I have recently installed the arm64 version of R from the Mac nightly builds page. It's working great! Except - for packages that require compilation. For example, if I try and install xfun which is required for blogdown, I get the following error
ld: warning: ignoring file /usr/local/opt/llvm/lib/libc++.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: in '/usr/local/opt/llvm/lib/libunwind.dylib', building for macOS-arm64 but attempting to link with file built for macOS-x86_64
So..... how to fix this in order to keep things trucking?
For reference, here is my sessionInfo()
> sessionInfo()
R version 4.1.0 alpha (2021-04-26 r80229)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.2.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 parallel_4.1.0
OK. This was due to setting some MAKEVARS from an older R installation.
I feel ashamed.
But, if anyone else is having this problem, look at ~/.R/Makevars
Now to solve gfortran issues.
New job gave me a fresh Windows laptop where I am struggling (to say the very least) to set up a fresh R environment. Specifically, when developing a package, the commmand Install and Restart exits abruptly due to permission issues on a specific .dll file.
==> Rcmd.exe INSTALL --no-multiarch --with-keep.source --install-tests curl
* installing to library 'C:/R/R-Library'
* installing *source* package 'curl' ...
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/R/R-Library/curl'
* restoring previous 'C:/R/R-Library/curl'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\R\R-Library\00LOCK-curl\curl\libs\x64\curl.dll to C:\R\R-Library\curl\libs\x64\curl.dll: Permission denied
Exited with status 1.
As a first attempt to ameliorate the issue, I've moved both my R installation and library at C:/. This obviously seems not to be enough.
> .libPaths()
[1] "C:/R/R-Library" "C:/R/R-4.0.3/library"
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252 LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Italy.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3
I am kind of lost as to where to look next. As a last shot in the dark I've tried to run RStudio with Admin right with no luck.
I'm on a Mac OS Sierra WITHOUT admin privileges (ugh). There's a bunch of packages I really need to install, but for the vast majority, when I try to install, I get the following error:
make: x86_64-apple-darwin13.4.0-clang: No such file or directory
make: *** [base64.o] Error 1
ERROR: compilation failed for package ‘RCurl’
I have clang installed but it's a different version:
clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
I suspect this mismatch is the problem, but not being particularly savvy with installs and the innards of the computer, I really have no idea how to resolve it. I haven't been able to find a similar enough issue that someone else that that's helped my situation.
I've tried editing my path to include all the possibilities that occur to me. I've also tried installing devtools (same error, essentially). My sessionInfo() and r --version information are below.
r --version
R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
... and sessionInfo():
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2
The plan ist to import an Access database into R to filter out what I need to make statistical analysis.
A colleague suggested me the following code:
library(Hmisc)
d <- mdb.get('140410_db_vegBY1.mdb')
#(data under #https://www.dropbox.com/sh/ra588lailweynrq/AACRVqMKWtd9Zz7fa94O9CAUa)
# ERROR: sh: mdb-tables: command not found
# Fehler in system(paste("mdb-tables -1", file), intern = TRUE) :
# Fehler bei der Ausführung des Kommandos
After my search I started to install mdb tools on my mac OS X 10.9.2 following this link:
http://automatthew.wordpress.com/2008/06/23/how-to-compile-mdbtools-on-mac-os-x-10-4-and-10-5/#comment-124
But it didn't work but the thread seems to be inactive.
Can somebody help me?
The following steps worked for me.
Install the Hmisc package for R.
Install mdbtools version 0.7.1 by homebrew: brew install mdbtools.
Use mdb.get() function in the Hmisc package to read .mdb files into R:
library(Hmisc)
df <- mdb.get('file.mdb')
Here is my setup and package versions:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.1 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] Hmisc_3.17-0 ggplot2_1.0.1 Formula_1.2-1 survival_2.38-3
[5] lattice_0.20-33
I should mention that I first tried to install mdbtools from source to no avail. I suspect that it was because some dependencies were not installed. See https://github.com/brianb/mdbtools for more information on the dependencies.