My installation of R seems to be faulty. I tried using several packages using library()
, and was told they could not be found. I then tried just running library()
with no arguments, and it said Warning message: In library() : library ‘/usr/local/lib/R/site-library’ contains no packages
.
The output of .libpaths
is
[1] "/home/username/R/x86_64-pc-linux-gnu-library/3.2"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
The output of sessionInfo()
is
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.3
locale:
[1] LC_CTYPE=en_AU.UTF-8
[2] LC_NUMERIC=C
[3] LC_TIME=en_AU.UTF-8
[4] LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8
[6] LC_MESSAGES=en_AU.UTF-8
[7] LC_PAPER=en_AU.UTF-8
[8] LC_NAME=C
[9] LC_ADDRESS=C
[10] LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8
[12] LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] tools_3.2.3
I have not been able to find any information on this error online. Everyone else seems to have a problem with not finding specific packages. I have not seen anyone complain about having no packages whatsoever.
These are the error messages I have received when attempting to install "tidyverse" from RStudio using install.packages("tidyverse")
:
Installing package into ‘/home/username/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies
...
* installing *source* package ‘colorspace’ ...
** package ‘colorspace’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c colorspace.c -o colorspace.o
colorspace.c:2:19: fatal error: ctype.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:159: recipe for target 'colorspace.o' failed
make: *** [colorspace.o] Error 1
ERROR: compilation failed for package ‘colorspace’
* removing ‘/home/dylanus-zwei/R/x86_64-pc-linux-gnu-library/3.4/colorspace’
Warning in install.packages :
installation of package ‘colorspace’ had non-zero exit status
This repeats for a while, followed by:
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
* csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
The same error arises for openssl. I installed libcurl this morning, so I'm not sure what it's expecting here.
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... no
The C compiler definitely works. I have used it many times. The other messages all seem to be the same kind of thing.