Error installing TM package


#1

I am using R version 3.4.2 in a Red Hat Linux and I am installing the TM package and get the following error:

tdm.cpp:63: error: expected initializer before ‘:’ token
tdm.cpp:67: error: expected primary-expression before ‘return’
tdm.cpp:67: error: expected ‘;’ before ‘return’
tdm.cpp:67: error: expected primary-expression before ‘return’
tdm.cpp:67: error: expected ‘)’ before ‘return’
make: *** [tdm.o] Error 1
ERROR: compilation failed for package ‘tm’

  • removing ‘/usr/lib64/R/library/tm’
    I need help to solve this problem. Does anyone know the answer?

#2

The tm package has a system dependency on C++ 11.

It seems that your gcc compiler is not configured to handle this.

You can address this by installing the Red Hat Developer Toolset.