Install rtracklayer with the Error undefined symbol: OPENSSL_init_ssl (system Centos7.3 R3.5.1 openssl-1.1.1)
1
0
Entering edit mode
@ruan_wei_dong-18641
Last seen 5.1 years ago

Dear Bioconductor Support,

I Updated My R  to 3.5.1 and reinstalled the rtracklayer. However, I got the error report as follows:

1 error part

Creating a generic function from function 'uri' in package 'rtracklayer'

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

2 error part

Error: package or namespace load failed for 'rtracklayer' in dyn.load(file, DLLpath = DLLpath, ...):

 unable to load shared object '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so':

/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so: undefined symbol: OPENSSL_init_ssl.

Error: loading failed
Execution halted
ERROR: loading failed

Next I used the 'ldd' command to find what the  libraries needed by rtracklayer.so.But all  libraries are satisfied(The latter part has related reports)

I do not know if it is my installation problem, or if there is a problem with OpenSSL, or a problem with rtracklayer.

How do I properly install the rtracklayer package? The installation instructions are recommended as follows:

The rtracklayer package can use openssl for accessing https URLs when e.g. importing BigWig files. One can set the OPENSSL_LIBS and OPENSSL_CFLAGS environment variables for specifying the relevant linker and preprocessor/compiler flags, respectively.

How to set the  OPENSSL_LIBS and OPENSSL_CFLAGS environment variables?

I need your help! Thank you so much!

system: Centos7.3 ,openssl 1.1.1 and R 3.5.1

 

> sessionInfo()


R version 3.5.1 (2018-07-02)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.5.1
>

Install command

> BiocManager::install("rtracklayer", version = "3.8")

Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.1 (2018-07-02)

Installing package(s) 'rtracklayer'

trying URL 'https://bioconductor.org/packages/3.8/bioc/src/contrib/rtracklayer_1.42.1.tar.gz'

Content type 'application/x-gzip' length 1381513 bytes (1.3 MB)

==================================================

downloaded 1.3 MB

 

** byte-compile and prepare package for lazy loading

Creating a generic function for 'offset' from package 'stats' in package 'rtracklayer'

Creating a generic function from function 'uri' in package 'rtracklayer'

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

** help

 

** building package indices

** installing vignettes

** testing if installed package can be loaded

Error: package or namespace load failed for 'rtracklayer' in dyn.load(file, DLLpath = DLLpath, ...):

 unable to load shared object '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so':

  /home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so: undefined symbol: OPENSSL_init_ssl

Error: loading failed

Execution halted

ERROR: loading failed

* removing '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer'

The downloaded source packages are in

        '/tmp/RtmpAVy7Gv/downloaded_packages'

Warning message:

In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :

  installation of package 'rtracklayer' had non-zero exit status

>

>  ldd /home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so

>         linux-vdso.so.1 =>  (0x00007ffd9e75d000)

>         libz.so.1 => /lib64/libz.so.1 (0x00007f3f1b303000)

>         libssl.so.10 => /lib64/libssl.so.10 (0x00007f3f1b090000)

>         libcrypto.so.1.1 => /usr/local/lib64/libcrypto.so.1.1 (0x00007f3f1abad000)

>         libR.so => /usr/lib64/R/lib/libR.so (0x00007f3f1a539000)

>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3f1a31c000)

>         libc.so.6 => /lib64/libc.so.6 (0x00007f3f19f4f000)

>         libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f3f19d01000)

>         libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f3f19a19000)

>         libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f3f19815000)

>         libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f3f195e3000)

>         libcrypto.so.10 => /lib/libcrypto.so.10 (0x00007f3f19181000)

>         libdl.so.2 => /lib64/libdl.so.2 (0x00007f3f18f7d000)

>         libRblas.so => /usr/lib64/R/lib/libRblas.so (0x00007f3f16a89000)

>         libgfortran.so.3 => /lib64/libgfortran.so.3 (0x00007f3f16766000)

>         libm.so.6 => /lib64/libm.so.6 (0x00007f3f16464000)

>         libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f3f16228000)

>         libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f3f15fe1000)

>         libtre.so.5 => /lib64/libtre.so.5 (0x00007f3f15dd1000)

>         libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f3f15b6f000)

>         liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f3f15948000)

>         libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f3f15738000)

>         librt.so.1 => /lib64/librt.so.1 (0x00007f3f15530000)

>         libicuuc.so.50 => /lib64/libicuuc.so.50 (0x00007f3f151b6000)

>         libicui18n.so.50 => /lib64/libicui18n..so.50 (0x00007f3f14db7000)

>         libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f3f14b91000)

>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3f1497a000)

>         /lib64/ld-linux-x86-64.so.2 (0x00007f3f1b7af000)

>         libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f3f1476b000)

>         libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f3f14566000)

>         libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f3f1434d000)

>         libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f3f14123000)

>         libicudata.so.50 => /lib64/libicudata.so.50 (0x00007f3f12b4e000)

>         libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3f127d2000)

>         libselinux.so.1 => /lib64/libselinux..so.1 (0x00007f3f125ab000)

software error rtracklayer bioconductor openssl • 6.2k views
ADD COMMENT
1
Entering edit mode

It's strange how the actual building of the package is not in the log. Are you omitting that?

Probably what's happening here is that the build process is finding openssl >=1.1.0 headers, which map SSL_library_init() to OPENSSL_init_ssl(), but the runtime linker is finding an older openssl lib (<= 1.0.2) that is missing that symbol.

Somehow the configure script is finding the openssl.pc file for the newer openssl. You could try setting PKG_CONFIG_PATH to point to the file for the older one.

You can use Sys.setenv() in R to set environment variables.

ADD REPLY
0
Entering edit mode

Now I think the problem must be in the libcrypto.so.1.1 . 

I tried to delete libcrypto.so.1.1 and changed it to openssl-1.0.0, openssl-1.1.1, openssl-1.1.2 and got a similar error report. You can check out my own reply.

What should I do next?

ADD REPLY
0
Entering edit mode

I wouldn't do any renaming of files. You're going to have to figure out the versions of your openssl headers and libraries, and make sure that you're using the same version for both by setting environment variables as described previously.

ADD REPLY
0
Entering edit mode

Sorry, I am a chemist. I just started learning R language. Can you give me some specific implementation commands? This is a bit difficult for me. I don't know how to set PKG_CONFIG_PATH and Sys.setenv(). I am so sorry.Thanks a lot!

ADD REPLY
0
Entering edit mode

Since you're using CentOS, I wonder if you're using R in an enterprise environment, where you might have system support staff available to help you?

ADD REPLY
0
Entering edit mode

Too many log file words, bioconductor does not support too many words. If you are willing to read the log file, I can email it to you.That is too difficult for me.

ADD REPLY
0
Entering edit mode

Operate on my own computer. Maybe I should find a classmate who is familiar with the CentOS system to help. This may be difficult, chemistry students rarely use the Linux system. But I will try it, thank you very much. If you have any guidance and advice, look forward to your help.

ADD REPLY
0
Entering edit mode

If you have root, you could probably try updating your openssl to 1.1.0 or above. But if you can't set an environment variable, that might be a tall order.

ADD REPLY
0
Entering edit mode

Thank you! I tried setting PKG_CONFIG_PATH to my  /usr/local/lib64/pkgconfig, it is work well.

I have learned a lot, thank you Michael Lawrence!!

[RWD@localhost tmp]$ ls /usr/local/lib64/pkgconfig
libcrypto.pc  libssl.pc  openssl.pc

[RWD@localhost tmp]$ less /usr/local/lib64/pkgconfig/openssl.pc

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=${prefix}/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 1.1.2-dev
Requires: libssl libcrypto

 

 

 

ADD REPLY
0
Entering edit mode

I found a useful information on the website.

https://github.com/openssl/openssl/blob/32f803d88ec3df7f95dfbf840c271f7438ce3357/doc/man3/SSL_library_init.pod

The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl().

Is this the reason?

ADD REPLY
0
Entering edit mode

Now I know the problem must be in the libcrypto.so.1.1 . Possible modification of the library file is the answer!!!

https://github.com/openssl/openssl/blob/32f803d88ec3df7f95dfbf840c271f7438ce3357/doc/man3/SSL_library_init.pod

The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl().

This may require enough attention, the rtracklayer package is very important. I need help!

If anyone can help me, please!!!

 

 

Why am I so sure?

when I removed the  /usr/local/lib64/libcrypto.so.1.1  I got the new error report as follows:

Error: package or namespace load failed for 'rtracklayer' in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so':
  libcrypto.so.1.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed

When I connect the library file /usr/local/lib64/libcrypto.so.1.1 to  /usr/local/lib/libcrypto.so.1.0.2k. I got the new error report as follows:

Error: package or namespace load failed for 'rtracklayer' in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so':
  /lib/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so)
Error: loading failed
Execution halted
ERROR: loading failed

 

 

 

ADD REPLY
0
Entering edit mode
@ruan_wei_dong-18641
Last seen 5.1 years ago

I solved this problem, thank Michael Lawrence for his helpful help, and hope that my experience can help others.

Error 1

Creating a generic function from function 'uri' in package 'rtracklayer'

Note: possible error in 'updateIds(doc, save = x)': unused argument (save = x)

........

Solution1:

This may be because the XML package is not installed. When I installed the package, there was no similar error. Installing the XML package may also result in the lack of some dynamic libraries, but it is easy to solve.

Error 2

Error: package or namespace load failed for 'rtracklayer' in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so':

  /home/RWD/R/x86_64-redhat-linux-gnu-library/3.5/rtracklayer/libs/rtracklayer.so: undefined symbol: OPENSSL_init_ssl

Error: loading failed

Solution2:

[RWD@localhost tmp]$ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig         ##where my openssl-1.1.2 pkgconfig is located

[RWD@localhost tmp]$ ls /usr/local/lib64/pkgconfig

libcrypto.pc  libssl.pc  openssl.pc

[RWD@localhost tmp]$ less /usr/local/lib64/pkgconfig/openssl.pc

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=${prefix}/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 1.1.2-dev
Requires: libssl libcrypto

[RWD@localhost tmp]$ R

>Sys.getenv()

.................

PERL_MB_OPT             --install_base /home/RWD/perl5
PERL_MM_OPT             INSTALL_BASE=/home/RWD/perl5
PKG_CONFIG_PATH         /usr/local/lib64/pkgconfig
PWD                     /home/RWD
QTDIR                   /usr/lib64/qt-3.3
QTINC                   /usr/lib64/qt-3.3/include
..................
>BiocManager::install("rtracklayer", version = "3.8")

** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (rtracklayer)

 

ADD COMMENT

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6