2016-06-01 121 views
1

我是一個新手,目前正嘗試在R(我有一個SUSE Linux Enterprise服務器SP3分發)中安裝openssl軟件包,但是失敗了。該錯誤信息是這樣的:在R SUSE中安裝openssl失敗

During startup - Warning message: 
Setting LC_CTYPE failed, using "C" 
* installing *source* package 'openssl' ... 
** package 'openssl' successfully unpacked and MD5 sums checked 
Using PKG_CFLAGS= 
Using PKG_LIBS=-lssl -lcrypto 
------------------------- ANTICONF ERROR --------------------------- 
Configuration failed because openssl was not found. Try installing:  
* deb: libssl-dev (Debian, Ubuntu, etc) 
* rpm: openssl-devel (Fedora, CentOS, RHEL) 
* csw: libssl_dev (Solaris) 
* brew: openssl (Mac OSX) 
If openssl is already installed, check that 'pkg-config' is in your 
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pig-config 
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: 
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' 
-------------------------------------------------------------------- 
ERROR: configuration failed for package 'openssl' 

我確信在SUSE已經安裝了OpenSSL:

OpenSSL 0.9.8j-fips 07 Jan 2009 
built on: Mon May 2 15:55:35 UTC 2016 
platform: linux-x86_64 
options: bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,4,long) blowfish(ptr2) 
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT - 
DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -fmessage-length=0 -O2 
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous- 
unwind-tables -g -fomit-frame-pointer -fno-strict-aliasing -DTERMIO -DPURIFY - 
Wall -fstack-protector -Wa,--noexecstack -fprofile-use -DOPENSSL_BN_ASM_MONT 
- DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM 
OPENSSLDIR: "/etc/ssl" 

而且openssl.pc文件位於:

/home/oscar/anaconda_ete/pkgs/openssl-1.0.2g-0/lib/pkgconfig/openssl.pc 
/home/oscar/anaconda_ete/lib/pkgconfig/openssl.pc 
/etc/ssl/openssl.pc 
/usr/lib64/pkgconfig/openssl.pc 

我會非常感謝您提供的任何幫助。我一直被困在試圖解決這個問題沒有任何成功的日子裏。非常感謝。
P.S .:我正在安裝這個軟件包(openssl),因爲它是另一個R軟件包(BioGeoBEARS)所要求的。

+0

當我安裝了'openssl'在R中,我得到消息: 'Found pkg-config cflags and libs!' 'Using PKG_CFLAGS =' 'Using PKG_LIBS = -lssl -lcrypto' 因此,儘量安裝'libssl-dev',你的錯誤信息。 –

+0

嘿J_F非常感謝您的超級快速回復。看來libopenssl-devel已經安裝。這是我在嘗試安裝時得到的消息:'正在讀取已安裝的軟件包...'已安裝' 'libopenssl-devel'。 沒有更新候選'libopenssl-devel-0.9.8j-0.97.1.x86_64'。最高可用版本已安裝。 解決軟件包依賴關係... 無事可做。「我現在該做什麼? :( – SiriusB

+0

看你的終端,如果安裝了libssl-dev: 'dpkg --get-selections | grep libssl' –

回答

0

您不能在SLES 11上安裝比0.9.8更新的版本,因爲下一個openssl版本與其自身不兼容。 https://www.suse.com/communities/blog/tls-1-2/ https://www.openssl.org/news/changelog.html#x37

但是是建立在一個額外的文件夾中安裝上SLES11 OpenSSL的1.0.2和R-OpenSSL軟件包指向它的可能性。

下載和提取OpenSSL的SRC壓縮包

cd ~ curl https://www.openssl.org/source/openssl-1.1.0f.tar.gz | tar zxv

創建額外的OpenSSL版本 例如一個新的目錄

sudo mkdir -p /opt/R/extra/openssl

構建和安裝的OpenSSL 1.1.0前綴

cd openssl-1.1.0f ./configure --prefix=/opt/R/extra/openssl make sudo make install

安裝R-包的OpenSSL(0.9.7)

cd ~ R CMD INSTALL --configure-vars='INCLUDE_DIR=/opt/R/extra/openssl/include LIB_DIR=/opt/R/extra/openssl/lib' openssl_0.9.7.tar.gz