I am running Ubuntu 16.04 [now 17.04: see note in bold below] and R 3.4.1. I installed the latest this morning, so I guess this is the latest version. I want to install Tidyverse, with whom I spent many happy hours under Windows. But when I do install.packages("tidyverse"), I get errors about unrecognized command line options for gcc. They begin when the installation falls into the color space and munsell packages. I will give an example at the end of this post, for munsell only.
I did not find anyone who had such a problem on Ubuntu 16.04. But messages from people with similar problems show that my gcc may be too old to recognize the -fstack-protector-strong and -Wdate-time options.
Possible workarounds I was thinking about:
1) Upgrade Ubuntu to 16.10 or 17.04 in the hope that one of them has a suitable gcc. However, I lack my Ubuntu experience here: in particular, it seems like I should update twice, once until 16.10, and then again until 17.04. I can’t even do a system update until 16.10: the steps recommended in https://wiki.ubuntu.com/YakketyYak/ReleaseNotes , “Update from Ubuntu 16.04 LTS”, t find updates when I try them. Also, I don't know for sure if any of these Ubuntus will have the correct gcc.
Added next day . Although my attempts to update Ubuntu by following https://wiki.ubuntu.com/YakketyYak/ReleaseNotes did nothing yesterday, they really worked today. Maybe a cache problem? So now I have Ubuntu 17.04. However, I still get the same errors when trying to install Tidyverse.
2) Find an older version of Tidyverse that does not need these compiler options.
3) Update my Ubuntu gcc. But I don’t know if it will be nuclear core software on my machine, expecting an older gcc.
4) gcc Tidyverse - , , , , https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu. .
5) Ubuntu Windows. , "Micro $oft", , , Windows, Linux arcana , R. https://people.dsv.su.se/~jpalme/s1/hoare.pdf, " : ". ...
-, R Ubuntu?
:
`> install.packages("munsell")
Installing package into ‘/home/popx/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘colorspace’
trying URL 'https://cran.rstudio.com/src/contrib/colorspace_1.3-2.tar.gz'
Content type 'application/x-gzip' length 293433 bytes (286 KB)
==================================================
downloaded 286 KB
trying URL 'https://cran.rstudio.com/src/contrib/munsell_0.4.3.tar.gz'
Content type 'application/x-gzip' length 97244 bytes (94 KB)
==================================================
downloaded 94 KB
* 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
gcc: error: unrecognized command line option '-fstack-protector-strong'
gcc: error: unrecognized command line option '-Wdate-time'
/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/popx/R/x86_64-pc-linux-gnu-library/3.4/colorspace’
Warning in install.packages :
installation of package ‘colorspace’ had non-zero exit status
ERROR: dependency ‘colorspace’ is not available for package ‘munsell’
* removing ‘/home/popx/R/x86_64-pc-linux-gnu-library/3.4/munsell’
Warning in install.packages :
installation of package ‘munsell’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpQ8FW70/downloaded_packages’
Warning message:
R graphics engine version 12 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.