Error in package topicmodels

Asked

Viewed 128 times

1

I am using Rstudio to do my scritps. I try to install a package called topicmodels through the command

install.packages("topicmodels")

However, I get the following error message:

ERROR: dependency ‘tm’ is not available for package ‘topicmodels’.

Version of Rstudio: Version 1.1.456. Operating System: Ubuntu 16.04

How would I solve this?

  • Welcome to Stackoverflow! I tried to install this package here on my machine and it all worked out. I use the R 3.5.1. Maybe it’s the version of R on your machine that is out of date. Please run the command sessionInfo(), copy the result and edit your question with it. This will help us try to solve your problem.

1 answer

2

On the R, do:

install.packages('tm')
install.packages('topicmodels')

If this does not work, open the terminal (Ctrl+Alt+T) and run:

sudo apt-get install gsl-bin libgsl2

and then

sudo apt-get install gsl-bin libgsl-dev

typhoon Y when requested.

After, go to R and:

install.packages('topicmodels')

I tried it here and it worked.

  • 1

    Thanks for the guidance. I had your tip, but you made this mistake:( ERROR: Configuration failed for package ĩxml2' * removing ĩ/home/Adriano/R/x86_64-pc-linux-gnu-library/3.2/xml2' ERROR: dependency ¡xml2' is not available for package ¡tm' * removing ¡/home/Adriano/R/x86_64-pc-linux-gnu-library/3.2/tm' dependency ‘tm’ is not available for package ‘topicmodels’
* removing ‘/home/adriano/R/x86_64-pc-linux-gnu-library/3.2/topicmodels’
...
3: In install.packages("topicmodels") :
 installation of package ‘topicmodels’ had non-zero exit status

  • You executed the two codes in the terminal?

  • 1

    I followed in his footsteps. I made a mistake! Same error appeared: Error in download.file(url, destfile, method, mode = "Wb", ...) : Couldn’t connect to server Warning in download.Packages(pkgs, destdir = tmpd, available = available, : ERROR: dependency ːxml2' is not available for Warning message: In install.Packages("tm") : installation of package ːtm' had non-zero Exit status

  • Perform this action on R: install.packages('xml2'). Then run it again.

  • 1

    It worked out, buddy!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.