1

I have looked at answers here before, but when I tried them, all of them failed. I want to install tm package from R. I tried:

install.packages("tm", dependencies=TRUE)

but the output always was:

Warning messages:
1: In install.packages("tm", dependencies = TRUE) :
  installation of package ‘Rpoppler’ had non-zero exit status
2: In install.packages("tm", dependencies = TRUE) :
  installation of package ‘tm’ had non-zero exit status

Any hints?

lebelinoz
  • 4,890
  • 10
  • 33
  • 56
vidyarthi
  • 173
  • 2
  • 14

2 Answers2

2

Are you installing in UNIX?

Can you try to download the package from : (I tried and I manage to download it)

https://cran.r-project.org/web/packages/Rpoppler/index.html

Then try to install the tar.gz file offline? (ie. Tools -> Install Packages)

addicted
  • 2,901
  • 3
  • 28
  • 49
  • ok, installed the file, but when I type `library("Rpoppler")`, I get the error `there is no package called "Rpoppler"`, how to solve this? – vidyarthi Oct 06 '17 at 03:43
  • first try `library(Rpoppler)`. If can't, try to run `installed.packages()` and see if Rpoppler is there. – addicted Oct 06 '17 at 03:46
  • no, I dont see `Rpoppler` in the installed packages. – vidyarthi Oct 06 '17 at 03:53
  • That means your installation may not be successful. Do you have libpoppler-glib-dev for (if for Debian/Ubuntu), or poppler-glib-devel (if on Fedora)? These libs package are required to build and install Rpoppler package in Linux. Install it from yum or rpm or download here https://poppler.freedesktop.org/. Then try to rebuild and install Rpoppler package. You must ensure your installation is successful first before loading the library using `library(Rpoppler)` – addicted Oct 06 '17 at 03:56
  • my main intent is to install the package `"tm"`. Whether installing this would really help? – vidyarthi Oct 06 '17 at 03:59
  • Your `tm` package has Rpoppler as one of its dependecies which in turn require you to install all these packages. If you can install `tm` without requiring Rpoppler, then congratulation! Otherwise you can install `tm` on Windows environment instead because `tm` in Windows does not require Rpoppler. – addicted Oct 06 '17 at 04:04
  • just extracting the `tar.gz` and `tar.xz` files would mean they are installed right? – vidyarthi Oct 06 '17 at 04:13
  • You have to do `Tools -> Install Packages` in your Rstudio to *build and install* it. If you just extract it in some folders, how does R know how to find your package? – addicted Oct 06 '17 at 04:15
  • R CMD INSTALL package.tar.gz. Is this the first time you manually build and install R's binary source package? You can look this up. Stack Overflow is meant to solve a problem that you have tried to solve, not to spoonfeed. – addicted Oct 06 '17 at 04:23
  • I can clearly see Rpoppler installed on my system using File Mananager. But still, the result is the same. I am herewith pasting what I see in my terminal on typing the install argument: `install.packages("Rpoppler") Installing package into ‘/home/prajnan/R/i686-pc-linux-gnu-library/3.2’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'https://ftp.iitm.ac.in/cran/src/contrib/Rpoppler_0.1-0.tar.gz' Content type 'application/x-gzip' length 38275 bytes (37 KB) ================================================== downloaded 37 KB` – vidyarthi Oct 06 '17 at 04:26
  • `** package ‘Rpoppler’ successfully unpacked and MD5 sums checked checking for pkg-config... /usr/bin/pkg-config checking whether pkg-config knows about poppler-glib >= 0.18.0... no configure: error: cannot determine poppler-glib compile/link flags ERROR: configuration failed for package ‘Rpoppler’ * removing ‘/home/prajnan/R/i686-pc-linux-gnu-library/3.2/Rpoppler’ The downloaded source packages are in ‘/tmp/RtmpZ0uqPT/downloaded_packages’ Warning message: In install.packages("Rpoppler") : installation of package ‘Rpoppler’ had non-zero exit status` – vidyarthi Oct 06 '17 at 04:26
  • I am sorry, but am desperate, as I could load other packages, but not this one. – vidyarthi Oct 06 '17 at 04:26
  • thanks, though your answer had a role to play, but the main help was from [here](https://stackoverflow.com/questions/39885408/dependency-slam-is-not-available-when-installing-tm-package), finally installed the package tm – vidyarthi Oct 06 '17 at 05:02
  • Im glad it is solved. Thanks for linking to the help page as well. It helps build up my knowledge too. – addicted Oct 06 '17 at 06:06
1

It's a problem with that Rpoppler package. Here's the error I get when I try to install it:

> install.packages("Rpoppler")
Installing package into ‘C:/Users/alebel/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘Rpoppler’ is not available (for R version 3.4.1)

Sorry if that's not the answer you were hoping for.

lebelinoz
  • 4,890
  • 10
  • 33
  • 56