0

I am trying to install the package Rblpapi using the code install.packages("Rblpapi"). I get the following logs during the installation .

* installing *source* package 'Rblpapi' ...
** package 'Rblpapi' successfully unpacked and MD5 sums checked
** using staged installation
Setting up compilation for a linux 64-bit system
Error in download.file("https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz",  : 
  cannot open URL 'https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz'
In addition: Warning message:
In download.file("https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz",  :
  URL 'https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz': status was 'HTTP response code said error'
Execution halted
tar (child): blpHeaders.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Error in download.file("https://github.com/Rblp/blp/raw/master/linux64/blpLibrary.tar.gz",  : 
  cannot open URL 'https://github.com/Rblp/blp/raw/master/linux64/blpLibrary.tar.gz'
In addition: Warning message:
In download.file("https://github.com/Rblp/blp/raw/master/linux64/blpLibrary.tar.gz",  :
  URL 'https://github.com/Rblp/blp/raw/master/linux64/blpLibrary.tar.gz': status was 'HTTP response code said error'
Execution halted
tar (child): blpLibrary.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
** libs
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c authenticate.cpp -o authenticate.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c bdh.cpp -o bdh.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c bdp.cpp -o bdp.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c bds.cpp -o bds.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c beqs.cpp -o beqs.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c blpConnect.cpp -o blpConnect.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c blpVersion.cpp -o blpVersion.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c blpapi_utils.cpp -o blpapi_utils.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c bsrch.cpp -o bsrch.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c fieldsearch.cpp -o fieldsearch.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c getBars.cpp -o getBars.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c getFieldInfo.cpp -o getFieldInfo.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c getTicks.cpp -o getTicks.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c lookup.cpp -o lookup.o
g++ -std=gnu++11 -I"/opt/R/4.1.3/lib/R/include" -DNDEBUG -I../inst/include/ -I. -I'/opt/R/4.1.3/lib/R/cran_library/Rcpp/include' -I'/opt/R/4.1.3/lib/R/cran_library/BH/include' -I/usr/local/include   -fpic  -g -O2  -c subscribe.cpp -o subscribe.o
g++ -std=gnu++11 -shared -L/opt/R/4.1.3/lib/R/lib -L/usr/local/lib -o Rblpapi.so RcppExports.o authenticate.o bdh.o bdp.o bds.o beqs.o blpConnect.o blpVersion.o blpapi_utils.o bsrch.o fieldsearch.o getBars.o getFieldInfo.o getTicks.o lookup.o subscribe.o -lblpapi3_64 -L../inst/blp -Wl,-rpath,$ORIGIN/../blp -L/opt/R/4.1.3/lib/R/lib -lR
/usr/bin/ld: cannot find -lblpapi3_64
collect2: error: ld returned 1 exit status
make: *** [/opt/R/4.1.3/lib/R/share/make/shlib.mk:10: Rblpapi.so] Error 1
ERROR: compilation failed for package 'Rblpapi'
* removing '/home/dsp/workspace/code/R/user_library/ubuntu/4.1/Rblpapi'
Warning in install.packages :
  installation of package 'Rblpapi' had non-zero exit status

The downloaded source packages are in
    '/tmp/RtmpVEpK3y/downloaded_packages'

Can anyone please explain the reason behind these errors Can anyone please explain the reason behind these errors

  • 1
    You should start at the top with `Error in download.file("https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz", : cannot open URL 'https://github.com/Rblp/blp/raw/master/headers/linux/blpHeaders.tar.gz'`. For what it is worth, I can (right now) install the package just fine on Ubuntu under R 4.3.1. – Dirk Eddelbuettel Aug 15 '23 at 17:07
  • How can I go on with debugging the error ? My version is 4.1.3 – Siddharth Somani Aug 15 '23 at 17:15
  • 1
    Start by understanding the error: why does the download fail? Is it a network issue? Is it because it assumes a URL for 4.1.* when the current R is at 4.3.* ? As I said earlier, I cannot reproduce your error so I am afraid you have to do the legwork at your end. I also note that you have R in `/opt/R` which is different and hence a potential source of error -- CRAN does do that, many of us developers do not do that. That said, that part should not matter. I'd look into if can you download the required tar.gz and if you can, why else this may fail. Good luck. – Dirk Eddelbuettel Aug 15 '23 at 17:34
  • For context (perhaps targeting @DirkEddelbuettel, but not strictly), I have R in `/opt/R/` on one host because the Posit Connect server needs access to multiple versions of R concurrently, and having multiple versions of R installed/managed by `apt` and friends can be problematic (if possible ... I didn't try, tbh). This does unfortunately bypass the ability to use all of the packages Dirk works so hard to make "easy" for linux users to install, but that step is mostly handled by Connect anyway (required for use of `packrat` and `renv`). BTW, thanks Dirk, I appreciate your work on all of that. – r2evans Aug 15 '23 at 17:39
  • 1
    Thanks @r2evans for the added colour but it is irrelevant. Rblpapi builds fine from source on all CRAN-relevant platforms. Now, R 4.1.* is not one. So a little out of my scope and too little by OP in the original report. Compiling is hard, and when you have r2u you don't need it. (Re connect/ppm and all that jazz: got a delicious "bug report" against a package that was entirely due to ppm pretending to install a workable package (needing a system dep) but didn't.) There are still too many potholes on these roads we travel ... Anyway glad you are (mostly, anyway) set. – Dirk Eddelbuettel Aug 15 '23 at 17:45
  • Bottom line, @SiddharthSomani, as Dirk said, nothing after `cannot open URL` is truly relevant. I don't have a download failure, so it's likely something in your OS ("internet options"?), your network (corporate firewall/policy?), or internet routing (regional or national connectivity/problems). – r2evans Aug 15 '23 at 17:52

0 Answers0