Error Installing 'Topicmodels' Package, Non Zero Exit Status; Ubuntu

Error installing 'topicmodels' package, non zero exit status; Ubuntu

I found out that on two of my Ubuntu installations, the non-zero exit status was caused by not having the gsl package. However, it took me quite sometime before I could figure out which version would cure the error.

In the terminal: sudo apt-get install libgsl0-dev

Error in installing TopicModels package in google collab

Try running this in a code cell before the installation of the topicmodels package.

system2('sudo', 'apt-get install libgsl0-dev')

This installs a required library in the Unix environment of Colab that you would normally install from a command prompt like this.

sudo apt-get install libgsl0-dev

In Python notebooks, you would do this.

!sudo apt-get install libgsl0-dev

But this doesn't seem to work in R notebooks so the system2 call does the work.

error Installing topicmodels in R Ubuntu

You don't have GSL installed:

sudo apt-get install gsl-bin libgsl0-dev

installation of package had non-zero exit status

When you call install.packages("broom") (or insert package), it appears the message you receive is:

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) to which you have answered yes.

Try no and compare results. This should fix the issue.

I can't install topicmodels package on OSX in R

This worked for me when trying to install "topicmodels" package on MacOS Mavericks: https://stackoverflow.com/a/24245311/3745085

How can I install topicmodels package in R?

First of all you have to install gsl. Once you have that installed you can try to install the R package. You can download gsl from here (there you can pick the latest version gsl-latest.tar.gz). Once it's been downloaded, install it by doing the following:

  1. Decompress the downloaded file (in my case the "latest" file contained this version: gsl-1.16)
  2. Open the "Terminal"
  3. Then (using the Terminal), move inside the folder that you created on step 1. In my case I had the file on the folder called "Downloads", so I moved to the newly created folder by doing:

    cd Downloads/gsl-1.16
  4. Once you are within that folder run the following commands (in order):

    ./configure
    make
    sudo make install
  5. After doing it you won't get the previous error saying fatal error: 'gsl/gsl_rng.h' file not found, so you can try again the installation.

  6. Now go back to your R environment (e.g., RStudio) to try again to install the package by doing:

    install.packages("PATH_TO_TOPIC_MODELS.tar.gz", repos=NULL, type="source").

I had the same problem, and after doing this I got the R package correctly installed, I hope it also works in your case.

Warning in install.packages : installation of package ‘tidyverse’ had non-zero exit status

You find the answer in your error message:

------------------------ ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
....
....

Copy and paste the following to your Terminal and than try installing tidyverse again. Should solve the problem.

# Required for many packages
sudo apt-get install -y libxml2-dev libcurl4-openssl-dev libssl-dev


Related Topics



Leave a reply



Submit