Cannot download packages on R (neither RStudio nor Terminal)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on it, which envolves using some GIS tools and RStudio.



Turns out three days ago I received a new computer form my boss and I decided to maintain the tradition and install linux too. All my co-workers were using Mint 18.3, so I downloaded it and installed it. It turns out it wasn't as straight-forward as I thought.



After reading a bunch of forums and questions posted here, I managed to update my sources.list and insert a CRAN mirror for the download of the latest release of R (3.4.4). RStudio promptly recognized it. However, installing new packages is nearly impossible, as even "native" functionalities, such as import dataset are disabled because the packages couldn't be downloaded.



I tried opening R through the terminal and installing packages using the install.packages function, but the problem persisted. How can I fix my RStudio in order to install packages correctly?



Below there is a copy of the log (note that I specified the mirror manually):



> install.packages("Rcpp",repo="https://cloud.r-project.org/", type="source")
Installing package into ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.16.tar.gz'
Content type 'application/x-gzip' length 3763400 bytes (3.6 MB)
==================================================
downloaded 3.6 MB

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
/bin/bash: g++: command not found
/usr/lib/R/etc/Makeconf:168: recipe for target 'Date.o' failed
make: *** [Date.o] Error 127
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status


Again, since I'm very new to linux, I don't know really which information I should provide to better help you, but please keep in mind that everything is probably on a default/factory setting. If you need additional information I can provide you (given the proper instructions)







share|improve this question
























    up vote
    0
    down vote

    favorite












    I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on it, which envolves using some GIS tools and RStudio.



    Turns out three days ago I received a new computer form my boss and I decided to maintain the tradition and install linux too. All my co-workers were using Mint 18.3, so I downloaded it and installed it. It turns out it wasn't as straight-forward as I thought.



    After reading a bunch of forums and questions posted here, I managed to update my sources.list and insert a CRAN mirror for the download of the latest release of R (3.4.4). RStudio promptly recognized it. However, installing new packages is nearly impossible, as even "native" functionalities, such as import dataset are disabled because the packages couldn't be downloaded.



    I tried opening R through the terminal and installing packages using the install.packages function, but the problem persisted. How can I fix my RStudio in order to install packages correctly?



    Below there is a copy of the log (note that I specified the mirror manually):



    > install.packages("Rcpp",repo="https://cloud.r-project.org/", type="source")
    Installing package into ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4’
    (as ‘lib’ is unspecified)
    trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.16.tar.gz'
    Content type 'application/x-gzip' length 3763400 bytes (3.6 MB)
    ==================================================
    downloaded 3.6 MB

    * installing *source* package ‘Rcpp’ ...
    ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
    /bin/bash: g++: command not found
    /usr/lib/R/etc/Makeconf:168: recipe for target 'Date.o' failed
    make: *** [Date.o] Error 127
    ERROR: compilation failed for package ‘Rcpp’
    * removing ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4/Rcpp’
    Warning in install.packages :
    installation of package ‘Rcpp’ had non-zero exit status


    Again, since I'm very new to linux, I don't know really which information I should provide to better help you, but please keep in mind that everything is probably on a default/factory setting. If you need additional information I can provide you (given the proper instructions)







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on it, which envolves using some GIS tools and RStudio.



      Turns out three days ago I received a new computer form my boss and I decided to maintain the tradition and install linux too. All my co-workers were using Mint 18.3, so I downloaded it and installed it. It turns out it wasn't as straight-forward as I thought.



      After reading a bunch of forums and questions posted here, I managed to update my sources.list and insert a CRAN mirror for the download of the latest release of R (3.4.4). RStudio promptly recognized it. However, installing new packages is nearly impossible, as even "native" functionalities, such as import dataset are disabled because the packages couldn't be downloaded.



      I tried opening R through the terminal and installing packages using the install.packages function, but the problem persisted. How can I fix my RStudio in order to install packages correctly?



      Below there is a copy of the log (note that I specified the mirror manually):



      > install.packages("Rcpp",repo="https://cloud.r-project.org/", type="source")
      Installing package into ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4’
      (as ‘lib’ is unspecified)
      trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.16.tar.gz'
      Content type 'application/x-gzip' length 3763400 bytes (3.6 MB)
      ==================================================
      downloaded 3.6 MB

      * installing *source* package ‘Rcpp’ ...
      ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
      ** libs
      g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
      /bin/bash: g++: command not found
      /usr/lib/R/etc/Makeconf:168: recipe for target 'Date.o' failed
      make: *** [Date.o] Error 127
      ERROR: compilation failed for package ‘Rcpp’
      * removing ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4/Rcpp’
      Warning in install.packages :
      installation of package ‘Rcpp’ had non-zero exit status


      Again, since I'm very new to linux, I don't know really which information I should provide to better help you, but please keep in mind that everything is probably on a default/factory setting. If you need additional information I can provide you (given the proper instructions)







      share|improve this question












      I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on it, which envolves using some GIS tools and RStudio.



      Turns out three days ago I received a new computer form my boss and I decided to maintain the tradition and install linux too. All my co-workers were using Mint 18.3, so I downloaded it and installed it. It turns out it wasn't as straight-forward as I thought.



      After reading a bunch of forums and questions posted here, I managed to update my sources.list and insert a CRAN mirror for the download of the latest release of R (3.4.4). RStudio promptly recognized it. However, installing new packages is nearly impossible, as even "native" functionalities, such as import dataset are disabled because the packages couldn't be downloaded.



      I tried opening R through the terminal and installing packages using the install.packages function, but the problem persisted. How can I fix my RStudio in order to install packages correctly?



      Below there is a copy of the log (note that I specified the mirror manually):



      > install.packages("Rcpp",repo="https://cloud.r-project.org/", type="source")
      Installing package into ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4’
      (as ‘lib’ is unspecified)
      trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.16.tar.gz'
      Content type 'application/x-gzip' length 3763400 bytes (3.6 MB)
      ==================================================
      downloaded 3.6 MB

      * installing *source* package ‘Rcpp’ ...
      ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
      ** libs
      g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
      /bin/bash: g++: command not found
      /usr/lib/R/etc/Makeconf:168: recipe for target 'Date.o' failed
      make: *** [Date.o] Error 127
      ERROR: compilation failed for package ‘Rcpp’
      * removing ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4/Rcpp’
      Warning in install.packages :
      installation of package ‘Rcpp’ had non-zero exit status


      Again, since I'm very new to linux, I don't know really which information I should provide to better help you, but please keep in mind that everything is probably on a default/factory setting. If you need additional information I can provide you (given the proper instructions)









      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 10 at 21:38









      Eric Lino

      1011




      1011




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Before you begin, many of the R packages depend on the following development tools so go ahead and install them first with apt-get install:



          r-base-dev


          You can install the R packages via Rstudio via Tools > Install Packages and they will work for R as well. Enter the names of the packages into the field separated by spaces or columns. Sometimes, you'll need Bioconductor to install the packages and you can find that information here:



          https://www.bioconductor.org/install/



          To give you an overview:



          source("https://bioconductor.org/biocLite.R")
          biocLite()


          That will set the package source URL for the packages and the script to download and install them.



          biocLite(c("GenomicFeatures", "AnnotationDbi"))


          Use that syntax with the package names enclosed in double quotes. It will then proceed with download and installation.






          share|improve this answer






















          • Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
            – Eric Lino
            Apr 11 at 18:29










          • That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
            – Nasir Riley
            Apr 11 at 19:59










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436870%2fcannot-download-packages-on-r-neither-rstudio-nor-terminal%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Before you begin, many of the R packages depend on the following development tools so go ahead and install them first with apt-get install:



          r-base-dev


          You can install the R packages via Rstudio via Tools > Install Packages and they will work for R as well. Enter the names of the packages into the field separated by spaces or columns. Sometimes, you'll need Bioconductor to install the packages and you can find that information here:



          https://www.bioconductor.org/install/



          To give you an overview:



          source("https://bioconductor.org/biocLite.R")
          biocLite()


          That will set the package source URL for the packages and the script to download and install them.



          biocLite(c("GenomicFeatures", "AnnotationDbi"))


          Use that syntax with the package names enclosed in double quotes. It will then proceed with download and installation.






          share|improve this answer






















          • Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
            – Eric Lino
            Apr 11 at 18:29










          • That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
            – Nasir Riley
            Apr 11 at 19:59














          up vote
          0
          down vote













          Before you begin, many of the R packages depend on the following development tools so go ahead and install them first with apt-get install:



          r-base-dev


          You can install the R packages via Rstudio via Tools > Install Packages and they will work for R as well. Enter the names of the packages into the field separated by spaces or columns. Sometimes, you'll need Bioconductor to install the packages and you can find that information here:



          https://www.bioconductor.org/install/



          To give you an overview:



          source("https://bioconductor.org/biocLite.R")
          biocLite()


          That will set the package source URL for the packages and the script to download and install them.



          biocLite(c("GenomicFeatures", "AnnotationDbi"))


          Use that syntax with the package names enclosed in double quotes. It will then proceed with download and installation.






          share|improve this answer






















          • Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
            – Eric Lino
            Apr 11 at 18:29










          • That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
            – Nasir Riley
            Apr 11 at 19:59












          up vote
          0
          down vote










          up vote
          0
          down vote









          Before you begin, many of the R packages depend on the following development tools so go ahead and install them first with apt-get install:



          r-base-dev


          You can install the R packages via Rstudio via Tools > Install Packages and they will work for R as well. Enter the names of the packages into the field separated by spaces or columns. Sometimes, you'll need Bioconductor to install the packages and you can find that information here:



          https://www.bioconductor.org/install/



          To give you an overview:



          source("https://bioconductor.org/biocLite.R")
          biocLite()


          That will set the package source URL for the packages and the script to download and install them.



          biocLite(c("GenomicFeatures", "AnnotationDbi"))


          Use that syntax with the package names enclosed in double quotes. It will then proceed with download and installation.






          share|improve this answer














          Before you begin, many of the R packages depend on the following development tools so go ahead and install them first with apt-get install:



          r-base-dev


          You can install the R packages via Rstudio via Tools > Install Packages and they will work for R as well. Enter the names of the packages into the field separated by spaces or columns. Sometimes, you'll need Bioconductor to install the packages and you can find that information here:



          https://www.bioconductor.org/install/



          To give you an overview:



          source("https://bioconductor.org/biocLite.R")
          biocLite()


          That will set the package source URL for the packages and the script to download and install them.



          biocLite(c("GenomicFeatures", "AnnotationDbi"))


          Use that syntax with the package names enclosed in double quotes. It will then proceed with download and installation.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 11 at 20:00

























          answered Apr 10 at 21:55









          Nasir Riley

          1,514138




          1,514138











          • Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
            – Eric Lino
            Apr 11 at 18:29










          • That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
            – Nasir Riley
            Apr 11 at 19:59
















          • Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
            – Eric Lino
            Apr 11 at 18:29










          • That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
            – Nasir Riley
            Apr 11 at 19:59















          Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
          – Eric Lino
          Apr 11 at 18:29




          Hey Nasir, thank you so much for spending your time and giving me such a detailed answer, but unfortunately, those 3 "apt-get install xxxxxx-devel" returned "Unable to locate package". Fortunately, I managed to solve the problem by using sudo apt-get install r-base-dev, which apparently had the necessary tool to make it work. However, if you have some insight on why I was unable to locate those packages, feel free to contribute. Thank you again.
          – Eric Lino
          Apr 11 at 18:29












          That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
          – Nasir Riley
          Apr 11 at 19:59




          That was an error on my part as I am used to working with RHEL and CentOS but it's different for you as your using Mint. I will edit that part in my answer. Were you able to install the R packages afterwards?
          – Nasir Riley
          Apr 11 at 19:59












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436870%2fcannot-download-packages-on-r-neither-rstudio-nor-terminal%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay