欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux中openssl/opensslv.h找不到問(wèn)題的解決方法

 更新時(shí)間:2017年07月06日 10:37:49   作者:bladestone  
最近在安裝scrapy過(guò)程中碰到了openssl某個(gè)文件找不到的問(wèn)題,通過(guò)查找相關(guān)的資料進(jìn)行了解決,下面這篇文章主要給大家分享了關(guān)于Linux中openssl/opensslv.h找不到問(wèn)題的解決方法,需要的朋友可以參考借鑒,下面來(lái)一起看看吧。

前言

眾所周知scrapy是Python中鼎鼎大名的爬蟲(chóng)框架,在安裝scrapy過(guò)程中碰到了openssl某個(gè)文件找不到的問(wèn)題,并進(jìn)行了分析,記錄之。

一、 scrapy以及安裝過(guò)程

Scrapy是python中鼎鼎大名的爬蟲(chóng)框架,筆者在Centos 7系統(tǒng)之上進(jìn)行安裝,發(fā)現(xiàn)了如下問(wèn)題:

   >> pip install scrapy

由于安裝過(guò)程中的過(guò)程信息比較多,這里只列出了其中的關(guān)鍵片段信息:

 running egg_info 
 writing requirements to src/cryptography.egg-info/requires.txt 
 writing src/cryptography.egg-info/PKG-INFO 
 writing top-level names to src/cryptography.egg-info/top_level.txt 
 writing dependency_links to src/cryptography.egg-info/dependency_links.txt 
 writing entry points to src/cryptography.egg-info/entry_points.txt 
 reading manifest file 'src/cryptography.egg-info/SOURCES.txt' 
 reading manifest template 'MANIFEST.in' 
 no previously-included directories found matching 'docs/_build' 
 warning: no previously-included files matching '*' found under directory 'vectors' 
 writing manifest file 'src/cryptography.egg-info/SOURCES.txt' 
 running build_ext 
 generating cffi module 'build/temp.linux-x86_64-2.7/_padding.c' 
 creating build/temp.linux-x86_64-2.7 
 generating cffi module 'build/temp.linux-x86_64-2.7/_constant_time.c' 
 generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c' 
 building '_openssl' extension 
 creating build/temp.linux-x86_64-2.7/build 
 creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7 
 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o 
 build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory 
 #include <openssl/opensslv.h> 
     ^ 
 compilation terminated. 
 error: command 'gcc' failed with exit status 1 
 
 ---------------------------------------- 
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hRMlG0/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ReCoWo-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-hRMlG0/cryptography/ 
[root@AY131203102210033c39Z ~]# yum install openssl build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory 
^C 
 
Exiting on user cancel. 

由于確實(shí)openssl.c文件而安裝失敗了,貌似沒(méi)有找到對(duì)應(yīng)的文件

二、問(wèn)題分析

首先懷疑openssl沒(méi)有安裝,故先進(jìn)行openssl的檢查:

  >> yum info openssl 

Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
 * base: mirrors.aliyun.com 
 * epel: mirrors.aliyun.com 
 * extras: mirrors.aliyun.com 
 * updates: mirrors.aliyun.com 
Installed Packages 
Name : openssl 
Arch : x86_64 
Epoch : 1 
Version : 1.0.1e 
Release : 60.el7_3.1 
Size : 1.5 M 
Repo : installed 
Summary : Utilities from the general purpose cryptography library with TLS implementation 
URL  : http://www.openssl.org/ 
License : OpenSSL 
Description : The OpenSSL toolkit provides support for secure communications between 
  : machines. OpenSSL includes a certificate management tool and shared 
  : libraries which provide various cryptographic algorithms and 
  : protocols. 

基于其中的信息可以得知,openssl是一家安裝過(guò)了,怎么還是會(huì)缺少openssl.c的文件呢?

經(jīng)過(guò)一番思考,豁然發(fā)現(xiàn)一個(gè)基本規(guī)則, openssl已經(jīng)安裝二進(jìn)制的可執(zhí)行程序,而這里的安裝scrapy則需要的是openssl的源文件程序,比如openssl.h。故這里需要補(bǔ)充安裝的是openssh.h的開(kāi)發(fā)版,其中包含相關(guān)的安裝源代碼文件。

三、問(wèn)題的解決

在確認(rèn)了問(wèn)題之后,接下來(lái)就是安裝openssl-devel的安裝包了:

  >> yum install openssl-devel

在安裝完成之后,重新安裝scrapy,就可以順利安裝成功了

總結(jié)

推而廣之,在Linux系統(tǒng)中都存在類似的問(wèn)題,在安裝特定安裝包的過(guò)程中,其依賴某些第三方開(kāi)發(fā)包,會(huì)曝出某些文件找不到的錯(cuò)誤,一般情況下是需要安裝依賴包的開(kāi)發(fā)版本的。 這個(gè)規(guī)則應(yīng)該是通用的。

好了,以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來(lái)一定的幫助,如果有疑問(wèn)大家可以留言交流,謝謝大家對(duì)腳本之家的支持。

相關(guān)文章

  • Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法

    Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法

    這篇文章主要介紹了Centos7.4服務(wù)器安裝apache及安裝過(guò)程出現(xiàn)的問(wèn)題解決方法,結(jié)合實(shí)例形式分析了Centos7.4服務(wù)器安裝apache相關(guān)命令、配置操作及端口占用等常見(jiàn)問(wèn)題解決方法,需要的朋友可以參考下
    2019-03-03
  • Linux的第二網(wǎng)卡的配置全過(guò)程

    Linux的第二網(wǎng)卡的配置全過(guò)程

    這篇文章主要介紹了Linux的第二網(wǎng)卡的配置全過(guò)程,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-11-11
  • linux中sed命令的使用與注意小結(jié)

    linux中sed命令的使用與注意小結(jié)

    sed本身也是一個(gè)管道命令,可以分析standard input的,sed可以將數(shù)據(jù)進(jìn)行替換、刪除、新增、選取特定行等。下面這篇文章主要介紹了linux中sed命令的用法和注意事項(xiàng),需要的朋友可以參考借鑒,下面來(lái)一起看看吧。
    2017-02-02
  • linux curl命令詳解及實(shí)例分享

    linux curl命令詳解及實(shí)例分享

    curl命令使用了libcurl庫(kù)來(lái)實(shí)現(xiàn),libcurl庫(kù)常用在C程序中用來(lái)處理HTTP請(qǐng)求,curlpp是libcurl的一個(gè)C++封裝,這幾個(gè)東西可以用在抓取網(wǎng)頁(yè)、網(wǎng)絡(luò)監(jiān)控等方面的開(kāi)發(fā),而curl命令可以幫助來(lái)解決開(kāi)發(fā)過(guò)程中遇到的問(wèn)題。
    2014-08-08
  • Apache 支持CGI程序和SSI程序的設(shè)置方法

    Apache 支持CGI程序和SSI程序的設(shè)置方法

    在這里,網(wǎng)頁(yè)教學(xué)網(wǎng)和大家探討如何修改服務(wù)器選項(xiàng)讓服務(wù)器能提供簡(jiǎn)單的動(dòng)態(tài)網(wǎng)頁(yè)內(nèi)容,也就是支持CGI程序及 Server-Side Include(SSI)程序。
    2009-10-10
  • windows apache多端口虛擬主機(jī)配置方法

    windows apache多端口虛擬主機(jī)配置方法

    有很多朋友喜歡在windows下使用apache作為web服務(wù)器,有時(shí)候想用非80端口提供服務(wù),因?yàn)槲磦浒赣蛎际欠饬?0端口,提供下載的時(shí)候可以用別的端口了,這里簡(jiǎn)單分享下,方便需要的朋友
    2013-03-03
  • 在 Linux 命令行發(fā)送郵件的 5 種方法(推薦)

    在 Linux 命令行發(fā)送郵件的 5 種方法(推薦)

    這篇文章主要介紹了在 Linux 命令行發(fā)送郵件的 5 種方法,本教程中包含了最流行的 5 個(gè)命令行郵件客戶端,你可以選擇其中一個(gè),需要的朋友可以參考下
    2019-12-12
  • Apache Spark詳解(推薦)

    Apache Spark詳解(推薦)

    spark.executor.memory以及其他Spark配置參數(shù)既可以在代碼中設(shè)置,也可以在其他幾個(gè)地方設(shè)置,具體取決于你的使用場(chǎng)景和偏好,這篇文章主要介紹了Apache Spark詳解,需要的朋友可以參考下
    2024-07-07
  • linux使用docker-compose部署軟件配置詳解

    linux使用docker-compose部署軟件配置詳解

    這篇文章主要給大家介紹了關(guān)于linux使用docker-compose部署軟件配置的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-12-12
  • Linux下一只五顏六色的「貓」

    Linux下一只五顏六色的「貓」

    這篇文章主要介紹了Linux下一只五顏六色的「貓」,在 Linux 下,此貓非彼貓,這里的 cat 并不代表貓,而是單詞 concatenate 的縮寫,主要給大家介紹了 ccat 的用法,需要的朋友可以參考下
    2020-07-07

最新評(píng)論