52719

Error when installing TDA package on R

Question:

I'm trying install TDA package on R

> install.packages("TDA") Installing package into ‘/home/more/R/x86_64-redhat-linux-gnu-library/3.3’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/TDA_1.5.tar.gz' Content type 'unknown' length 2006514 bytes (1.9 MB) ================================================== downloaded 1.9 MB

and I got this error

./gmpxx.h:41:17: fatal error: gmp.h: No such file or directory #include <gmp.h> ^ compilation terminated. make: *** [diag.o] Error 1 ERROR: compilation failed for package ‘TDA’ * removing ‘/home/more/R/x86_64-redhat-linux-gnu-library/3.3/TDA’ Warning in install.packages : installation of package ‘TDA’ had non-zero exit status

Here's my sessionInfo

R version 3.3.0 (2016-05-03) platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

The installation on my windows 7 was without any error

What should I do to fix this problem??

Answer1:

This worked for me on Fedora 23:

sudo yum install gmp-devel mpfr-devel

Answer2:

I got around this issue on Ubuntu 16.04 with:

sudo apt install libgmp3-dev libmpfr-dev

Recommend

  • Meteor stuck at Extracting meteor-tool@1.4.0-1
  • Displaying and sizing a grayscale from a QImage in Qt
  • Memory usage of storing strings as varchar in MySQL
  • PHP socket_read() only gets the first byte of the stream
  • UIimage to char* conversion
  • Google Protocol Buffer error
  • Easiest way to covert part of a byte array to uint16
  • Installing samr in in R 3.4
  • How to remove last utf8 char of a python string
  • PHP: Very simple Encode/Decode string
  • File random access in J2ME
  • Java: java.util.ConcurrentModificationException
  • openssl handshake failed
  • Boost binary serialization doesn't work occasionally. The parsed data is corrupted sometimes
  • How do I pip install from Google Code?
  • Serve file to user over http via php
  • Appium MobileElement swipe returns unknown server error
  • File extension of zlib zipped html page?
  • Django return user model id with L
  • Can't locate Module/Build.pm in @INC (@INC contains: /usr/local/lib64/perl5
  • Building Qt project for C++11 standard
  • Why are YouTube videos using 'youtube.com/v' not loading
  • Can I read an iPhone beacon with Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData
  • Eliminate partial duplicate rows from result set
  • copying resource to sdcard gives a damaged file in android
  • Is it possible to access block's scope in method?
  • Spark fat jar to run multiple versions on YARN
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • retrieve vertices with no linked edge in arangodb
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Free memory of cv::Mat loaded using FileStorage API
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • How do I configure my settings file to work with unit tests?
  • Change div Background jquery
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • apache spark aggregate function using min value
  • Is it possible to post an object from jquery to bottle.py?
  • Binding checkboxes to object values in AngularJs