Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running devtools::install_github("omegahat/RCurl") #26

Open
ScientificProgrammer opened this issue Sep 14, 2016 · 3 comments
Open

Comments

@ScientificProgrammer
Copy link

I have not been able to install the development version of RCurl. I haven't had any trouble installing other packages from Github repositories, and I had no problem installing the stable version using install.packages("RCurl"). I included three files with information about my system.

Sys.info.txt

RCurl Install Fail.txt

libcurlVersion.txt

@duncantl
Copy link
Collaborator

duncantl commented Sep 14, 2016

Thanks for all the details. Very helpful.
The last few lines of the RCurl Install Fail.txt are

installing to /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl/libs
** R
Error in .install_package_code_files(".", instdir) : 
  unable to write code files
ERROR: unable to collate and parse R files for package ‘RCurl’
* removing ‘/home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl’
Error: Command failed (1)

So the error is "unable to write code files". This strongly suggests a permission problem.
You might have installed the previous version as root or as another user.
But probably you cannot write into that directory - /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl

What is the output of
ls -als /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl

@ScientificProgrammer
Copy link
Author

ScientificProgrammer commented Sep 14, 2016

So the error is "unable to write code files". This strongly suggests a permission problem. You might have installed the previous version as root or as another user. But probably you cannot write into that directory - /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl

I had a similar thought. Since neither /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl or /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl/libs existed prior to trying to install the package. I made several attempts to install the package. After the initial install failed, I created ./RCurl. When that failed, I created ./RCurl/libs, which also failed.

What is the output of
ls -als /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl
Note that files were not placed in this directory until I manually created it.

ls -als /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl
total 68

4 drwxrwxr-x  14 eric eric 4096 Sep 13 23:59 .
4 drwxrwxr-x 118 eric eric 4096 Sep 13 23:59 ..
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 CurlSSL
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 data
4 -rw-rw-r--   1 eric eric 2312 Sep 13 23:59 DESCRIPTION
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 doc
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 enums
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 etc
4 drwxrwxr-x   3 eric eric 4096 Sep 13 23:59 examples
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 help
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 html
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 HTTPErrors
4 -rw-rw-r--   1 eric eric 3349 Sep 13 23:59 INDEX
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 libs
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 Meta
4 -rw-rw-r--   1 eric eric 2015 Sep 13 23:59 NAMESPACE
4 drwxrwxr-x   2 eric eric 4096 Sep 13 23:59 R

ls -als /home/eric/R/x86_64-pc-linux-gnu-library/3.3/RCurl/libs
total 208

  4 drwxrwxr-x  2 eric eric   4096 Sep 13 23:59 .
  4 drwxrwxr-x 14 eric eric   4096 Sep 13 23:59 ..
200 -rwxrwxr-x  1 eric eric 202288 Sep 13 23:59 RCurl.so

Note that I also received an error on my Windows box when I tried to install the package there from Github earlier today.

devtools::install_github(repo = "omegahat/RCurl")

 * installing *source* package 'RCurl' ...
 cp: cannot stat 'C:/curl/curl-7.50.1/lib/.libs/ssl/bin/*.dll': No such file or directory
 cp: cannot stat 'C:/curl/curl-7.50.1/lib/.libs/bin/libcurl-4.dll': No such file or directory
 cp: cannot stat 'C:/curl/curl-7.50.1/lib/.libs/bin/libz.dll': No such file or directory
 Warning: running command 'sh ./configure.win' had status 1
 ERROR: configuration failed for package 'RCurl'
 * removing 'C:/Personal/40125458/Documents/R/win-library/3.3/RCurl'
 * restoring previous 'C:/Personal/40125458/Documents/R/win-library/3.3/RCurl'
 Error: Command failed (1)

I did try to install the libz.dll beforehand, but I'm not sure if I placed it in the correct directory.

@tp2750
Copy link

tp2750 commented Oct 13, 2016

I have the same problem and perhaps a clue to a solution.

Download from git:

wget https://api.github.com/repos/omegahat/RCurl/zipball/master

Build package

R CMD build omegahat-RCurl-955200b

  • checking for file ‘omegahat-RCurl-955200b/DESCRIPTION’ ... OK
    cp: cannot stat ‘omegahat-RCurl-955200b/R/xbits.R’: No such file or directory
    cp: cannot stat ‘omegahat-RCurl-955200b/R/aclassesEnums.R’: No such file or directory

Check the files:

ls -l omegahat-RCurl-955200b/R/xbits.R
omegahat-RCurl-955200b/R/xbits.R -> ../../RAutoGenRunTime/R/xbits.R
ls -l omegahat-RCurl-955200b/R/aclassesEnums.R
omegahat-RCurl-955200b/R/aclassesEnums.R -> ../../RAutoGenRunTime/R/aclassesEnums.R

Seen from the "R" subdir ../.. is the download directory, so apparently it is looking for stuff outside of the repo.

Solution

If I also download RAutoGenRunTime it works:

wget https://api.github.com/repos/omegahat/RAutoGenRunTime/zipball/master
unzip master
ln -s omegahat-RAutoGenRunTime-b890ae5 RAutoGenRunTime

R CMD build omegahat-RCurl-955200b

  • checking for file ‘omegahat-RCurl-955200b/DESCRIPTION’ ... OK
  • preparing ‘RCurl’:
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • running ‘cleanup’
  • checking for LF line-endings in source and make files
  • checking for empty or unneeded directories
  • looking to see if a ‘data/datalist’ file should be added
  • building ‘RCurl_1.98-0.tar.gz’

Apparently devtools::install_github cannot figure this out.

Hope this helps.
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants