Sorry to be back so soon with a simple installation question, but my inability to solve it myself is seriously impairing my productivity. Anyway, I tried installing GenomicFeatures as suggested by the BC website.
> source("http://bioconductor.org/biocLite.R")
> biocLite("GenomicFeatures")
I received the following error messages (in addition to several warning messages)
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/tim/R/i686-pc-linux-gnu-library/2.15/RCurl’
ERROR: dependencies ‘XML’, ‘RCurl’ are not available for package ‘rtracklayer’
* removing ‘/home/tim/R/i686-pc-linux-gnu-library/2.15/rtracklayer’
ERROR: dependencies ‘XML’, ‘RCurl’ are not available for package ‘biomaRt’
* removing ‘/home/tim/R/i686-pc-linux-gnu-library/2.15/biomaRt’
ERROR: dependencies ‘rtracklayer’, ‘biomaRt’, ‘RCurl’ are not available for package ‘GenomicFeatures’
* removing ‘/home/tim/R/i686-pc-linux-gnu-library/2.15/GenomicFeatures’
So some problem with the dependencies I guess, but it seems strange that they would be automatically installed prior to GF. I am using version 2.15.0. Any clue as to what the problem might be? I'd be happy to provide more info as needed. Thanks.
Martin Morgan has a solution that I believe works in the comments. I'll elaborate on that a little bit.
The error messages are telling you that you need the RCurl and XML packages installed. Both of these packages require that your system has certain development packages on them. You appear to be running Linux. If you're using a Debian based system (Debian, Ubuntu, Mint, ...) then for RCurl to install you need to install libcurl4-openssl-dev and for XML to install you need to install libxml2-dev. You can accomplish this by relatively easily on the command line by typing
sudo apt-get install libcurl4-openssl-dev libxml2-dev
That should install the required packages and any dependencies. Then you should be able to install the RCurl and XML packages from within R.
install.packages("RCurl")
install.packages("XML")
At this point you have the required dependencies and should be able to install GenomicFeatures from Bioconductor.
source("http://bioconductor.org/biocLite.R")
biocLite("GenomicFeatures")
Just a note for those using Windows - getting RCurl and XML isn't necessarily easy, however, Dr. Brian Ripley provides binaries for these packages at his website and you can download them from there quite easily. Initially when I saw there was issues with RCurl and XML I thought it must be a windows user until I looked at the actual errors and realized it was a Linux user.
Related
I'm trying to prepare a report to my colleagues and students. I think the best way to make it reproducible is through Google Colab. My analysis was performed using R and some packages available on CRAN.
I am using a Jupyter Notebook with R kernel. I used the followinf link to create a Notebook with netive R kernel: https://colab.research.google.com/notebook#create=true&language=r. As you can see as follows, its running R.
a <- 1
print(a)
However, when I try to install the exactextractr package I get the following error:
install.packages("exactextractr")
Output:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘proxy’, ‘e1071’, ‘wk’, ‘sp’, ‘terra’, ‘classInt’, ‘s2’, ‘units’, ‘Rcpp’, ‘raster’, ‘sf’
Warning message in install.packages("exactextractr"):
“installation of package ‘units’ had non-zero exit status”
Warning message in install.packages("exactextractr"):
“installation of package ‘sf’ had non-zero exit status”
Warning message in install.packages("exactextractr"):
“installation of package ‘exactextractr’ had non-zero exit status”
The package was not installed:
library(exactextractr)
Output:
Error in library(exactextractr): there is no package called ‘exactextractr’
Traceback:
1. library(exactextractr)
What is the problem here?
Because the Linux variant underlying the GoogleColab is Ubuntu, you could also take advantage of r2u which brings about 20,000 binary CRAN packages with full dependencies to Ubuntu. So if (here) libudunits is needed, it gets installed!
A have a quick demo gif in this tweet (as SO limits image sizes) -- 17s total for everything from a 'blank' start in a container with just R, and r2u set up. This works in any Ubuntu system on stanard x86_64 (ie Intel or AMD): laptop, desktop, server, cloud, continuous integration, ... Give it a try -- as the demo shows it installs correctly via a single install.packages("exactextractor") from R!
Some of the packages that you are trying to install (exactextractr, terra, sf, units) have system dependencies. You can see that on the CRAN pages for these packages (here for terra) under "SystemRequirements".
In this case, you need to have GDAL, GEOS, PROJ, and udunits-2. Depending on the underlying linux system you can do something like the below to install them.
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev
This is essentially what r2evans suggests in the comments. And there is no doubt in my mind that what he says is correct.
See the github pages for more guidance on installing these packages. Here for "terra".
Also, try to install the dependencies one by one, so that it becomes clearer where the problem is.
E.g.
install.packages(‘proxy’)
install.packages(‘e1071’)
install.packages(‘wk’)
install.packages(‘sp’)
install.packages(‘terra’)
Etcetera.
Do this in one cell - R Colab doesn't support sudo directly.
system('sudo apt install libudunits2-dev')
Then this should work (I tried it successfully)
install.packages("exactextractr")
This is the code I have been running: (as suggested)
install.packages (c("devtools", "RcppArmadillo", "CompQuadForm", "doMC",
"foreach", "Matrix", "BiocManager", "testthat"),
repos = "http://cran.r-project.org/")
BiocManager::install(c("SeqArray", "SeqVarTools"))
devtools::install_github("hanchenphd/GMMAT")
I receive the subsequent messages in my console:
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘GMMAT’ Do you want to attempt to
install these from sources? (Yes/no/cancel)
Enter: YES
And then:
ERROR: compilation failed for package ‘GMMAT’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/GMMAT’**
I have attempted to uninstall and re-install R-Studio and R-console, have updated the platforms, installed any necessary packages for R/Macbook, etc. and still cannot seem to fix this issue. Currently using a Macbook so domc is not the issue.
Any help you guys could provide would be great!
I tried to install ROracle package in R. But unable to install the package. It is giving me the following error:
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘ROracle’
These will not be installed
Any idea how to fix it?
When I attempted to install the ROracle package from CRAN, I received the same error message. To fix it, I found that I needed to install the ROracle package located on the Oracle.com website. You'll need to sign up a free account first, and then you can find it by searching for "ROracle".
This package can be downloaded and installed error-free. It worked perfectly for me.
I am trying to install the packages rpanel and tkrplot on RStudio. After downloading and installing there I got this message:
downloaded 686 Kb
* installing *source* package ‘rpanel’ ...
** package ‘rpanel’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
Error in structure(.External(.C_dotTcl, ...), class = "tclObj") :
[tcl] can't find package BWidget.
Error : unable to load R code in package ‘rpanel’
ERROR: lazy loading failed for package ‘rpanel’
* removing ‘..../R/i686-pc-linux-gnu-library/3.0/rpanel’
Warning in install.packages :
installation of package ‘rpanel’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp1MdC0f/downloaded_packages’
I already installed BWidget on my own, but it didn't help.
Anyone any ideas about this problem and maybe can help me?
The system is Ubuntu 12.04.
Under windows 7 there is no problem and everything is working fine.
There are easier ways to install BWidgets. On my mac with Macports I did:
sudo port install BWidget
On Ubuntu you can probably install it with apt-get:
sudo apt-get install bwidget
"Stumbled across this while looking for an answer to the same question. Like an unfortunate number of library authors, the BWidgets people have assumed that the only people who need to use their libraries are planning to code with them. For those of us who've never used TCL, the installation instructions mean nothing.
From the a document called tuto-install-tkabber on the tkabber.jabber.ru website (irritating spam catcher won't let me post a URL), the answer is:
Install the BWidgets directory into the "lib" directory returned by:
whereis tcl
It should look something like: /usr/lib/tcl8.4"
from http://www.linuxquestions.org/questions/linux-software-2/where-to-install-bwidget-tcl-98583/ did the trick for me
Also I got BWidget from: http://sourceforge.net/projects/tcllib/files/BWidget/1.7.0/BWidget-1.7.0.zip/download
#Calimo's answer worked for me on Linux Mint 18.3 RStudio R 3.6.0. I would have commented in #Calimo's thread except for the stupid 50 reputation limit.
sudo apt-get install bwidget
Also works for Ubuntu 18 R 3.4.4 but if you get an X11 issue with rgl then this helped from #Ouistiti.
I had similar issues trying to get biotools working in Rstudio (on Ubuntu 16.04), where rpanel and tkrplot are required. Even after installing Bwidget per Calimo's answer, I got the error installation of package ‘tkrplot’ had non-zero exit status because tk.h: No such file or directory. If you look in the directory, this error is definitely correct. You need to get tk.h in there. I found out how to do so elsewhere on stackexchange:
Install tcl-dev package using apt or synaptic; tcl contains the
runtime, while tcl-devel contains header and development files. Do the
same with tk-dev
from:
https://stackoverflow.com/a/9649478/10405322
Thus,
sudo apt-get install tcl-dev
sudo apt-get install tk-dev
download BWidget from
http://sourceforge.net/project/showfiles.php?group_id=12883
once you get the archive BWidget-1.7.0.tar.gz move it to /usr/local/lib and install it with following code in terminal:
sudo mv /some_download_path/BWidget-1.7.0.tar.gz /usr/local/lib
cd /usr/loca/lib
sudo tar zxf BWidget-1.7.0.tar.gz
ok, done.
I am somewhat new to R, and I thought I understood how to install packages from CRAN mirrors and from source files, but now I am stumped. I currently am using R 2.10.0 on a Windows 7 32-bit machine.
I want to try to use the RGoogleAnalytics package found here and am trying to follow the instructions. They instruct us to install both RCurl and the XML packages from omegahat. For example,
install.packages("RCurl", repos = "http://www.omegahat.org/R")
however this does not work, as I get the following error:
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RCurl’ is not available
When I try this instead:
install.packages("RCurl", repos = "http://www.omegahat.org/R", type="source")
I get the following error after the file downloads. I previously had version 1.0 and that is restored.
trying URL 'http://www.omegahat.org/R/src/contrib/RCurl_1.5-0.tar.gz'
Content type 'application/x-gzip' length 735041 bytes (717 Kb)
opened URL
downloaded 717 Kb
* installing *source* package 'RCurl' ...
Warning in system("sh ./configure.win") : sh not found
ERROR: configuration failed for package 'RCurl'
* removing 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
* restoring previous 'C:/PROGRA~1/R/R-210~1.0/library/RCurl'
The downloaded packages are in
‘C:\Users\Brock\AppData\Local\Temp\Rtmpc9wt5N\downloaded_packages’
Warning message:
In install.packages("RCurl", repos = "http://www.omegahat.org/R", :
installation of package 'RCurl' had non-zero exit status
Without going into details, I haven't been able to use the RGoogleAnalytics package as I get the same error that is found in this post. I simply am trying to exhaust every possible option to get around the error.
Any help or insight you can provide will be greatly appreciated!
The RCurl project page on CRAN says the Windows binary is not available. The ReadMe points you to a page maintained by Professor Ripley, where he provides binaries of RCurl and several other packages that have special build needs on Windows. However, he only provides them for the most recent major revision of R, so you would need to upgrade to R-2.12.0 to install them from his page.
If you want to build packages from source on Windows, you need to install Rtools first. It looks like you haven't done that. Even if you had them installed, it will still require extra steps to build RCurl on Windows... else the Windows binary would already be on CRAN.
Your best bet is probably to upgrade R and install RCurl from Prof. Ripley's page.
You are probably missing the components to build packages under Windows:
http://www.murdoch-sutherland.com/Rtools/
According to RCurl FAQ, either
curl-config is not found in your path
or
curl-config and related devlopment libraries (libcurl) are not installed.