我需要在我的 python2.7 上安装 OpenSSL。
我试过了
$ pip install pyopenssl
我得到了以下内容
/usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
running build
running build_py
running build_ext
building 'OpenSSL.crypto' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c OpenSSL/crypto/crypto.c -o build/temp.linux-x86_64-2.7/OpenSSL/crypto/crypto.o
In file included from OpenSSL/crypto/crypto.h:17,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:17:25: error: openssl/ssl.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:17,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:25: error: expected specifier-qualifier-list before ‘X509’
OpenSSL/crypto/x509.h:29: error: expected declaration specifiers or ‘...’ before ‘ASN1_TIME’
OpenSSL/crypto/x509.h:30: error: expected declaration specifiers or ‘...’ before ‘ASN1_TIME’
In file included from OpenSSL/crypto/crypto.h:18,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509name.h:27: error: expected specifier-qualifier-list before ‘X509_NAME’
In file included from OpenSSL/crypto/crypto.h:19,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/netscape_spki.h:24: error: expected specifier-qualifier-list before ‘NETSCAPE_SPKI’
In file included from OpenSSL/crypto/crypto.h:20,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509store.h:25: error: expected specifier-qualifier-list before ‘X509_STORE’
In file included from OpenSSL/crypto/crypto.h:21,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509req.h:25: error: expected specifier-qualifier-list before ‘X509_REQ’
In file included from OpenSSL/crypto/crypto.h:22,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkey.h:27: error: expected specifier-qualifier-list before ‘EVP_PKEY’
In file included from OpenSSL/crypto/crypto.h:23,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509ext.h:16:28: error: openssl/x509v3.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:23,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509ext.h:28: error: expected specifier-qualifier-list before ‘X509_EXTENSION’
In file included from OpenSSL/crypto/crypto.h:24,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs7.h:15:27: error: openssl/pkcs7.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:24,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs7.h:25: error: expected specifier-qualifier-list before ‘PKCS7’
In file included from OpenSSL/crypto/crypto.h:25,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs12.h:14:28: error: openssl/pkcs12.h: No such file or directory
OpenSSL/crypto/pkcs12.h:15:26: error: openssl/asn1.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:25,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs12.h:37: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:26,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/crl.h:14: error: expected specifier-qualifier-list before ‘X509_CRL’
OpenSSL/crypto/crl.h:17: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:27,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/revoked.h:12: error: expected specifier-qualifier-list before ‘X509_REVOKED’
OpenSSL/crypto/revoked.h:16: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:28,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/../util.h:17:25: error: openssl/err.h: No such file or directory
In file included from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/crypto.h:74: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:75: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:76: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:77: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:78: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:80: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:81: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c: In function ‘crypto_load_privatekey’:
OpenSSL/crypto/crypto.c:78: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c:82: error: ‘pem_password_cb’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:82: error: (Each undeclared identifier is reported only once
OpenSSL/crypto/crypto.c:82: error: for each function it appears in.)
OpenSSL/crypto/crypto.c:82: error: ‘cb’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:84: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:84: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:85: error: ‘EVP_PKEY’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:85: error: ‘pkey’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:109: warning: implicit declaration of function ‘BIO_new_mem_buf’
OpenSSL/crypto/crypto.c:112: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:113: warning: implicit declaration of function ‘PEM_read_bio_PrivateKey’
OpenSSL/crypto/crypto.c:116: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:117: warning: implicit declaration of function ‘d2i_PrivateKey_bio’
OpenSSL/crypto/crypto.c:122: warning: implicit declaration of function ‘BIO_free’
OpenSSL/crypto/crypto.c:133: warning: implicit declaration of function ‘crypto_PKey_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_dump_privatekey’:
OpenSSL/crypto/crypto.c:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:157: error: ‘cipher’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:159: error: ‘pem_password_cb’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:159: error: ‘cb’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:161: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:161: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:162: error: ‘RSA’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:162: error: ‘rsa’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:176: warning: implicit declaration of function ‘EVP_get_cipherbyname’
OpenSSL/crypto/crypto.c:199: warning: implicit declaration of function ‘BIO_new’
OpenSSL/crypto/crypto.c:199: warning: implicit declaration of function ‘BIO_s_mem’
OpenSSL/crypto/crypto.c:202: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:203: warning: implicit declaration of function ‘PEM_write_bio_PrivateKey’
OpenSSL/crypto/crypto.c:203: error: ‘crypto_PKeyObj’ has no member named ‘pkey’
OpenSSL/crypto/crypto.c:211: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:212: warning: implicit declaration of function ‘i2d_PrivateKey_bio’
OpenSSL/crypto/crypto.c:212: error: ‘crypto_PKeyObj’ has no member named ‘pkey’
OpenSSL/crypto/crypto.c:216: warning: implicit declaration of function ‘EVP_PKEY_get1_RSA’
OpenSSL/crypto/crypto.c:216: error: ‘crypto_PKeyObj’ has no member named ‘pkey’
OpenSSL/crypto/crypto.c:217: warning: implicit declaration of function ‘RSA_print’
OpenSSL/crypto/crypto.c:218: warning: implicit declaration of function ‘RSA_free’
OpenSSL/crypto/crypto.c:234: warning: implicit declaration of function ‘BIO_get_mem_data’
OpenSSL/crypto/crypto.c: In function ‘crypto_load_certificate’:
OpenSSL/crypto/crypto.c:252: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c:255: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:255: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:256: error: ‘X509’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:256: error: ‘cert’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:264: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:265: warning: implicit declaration of function ‘PEM_read_bio_X509’
OpenSSL/crypto/crypto.c:268: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:269: warning: implicit declaration of function ‘d2i_X509_bio’
OpenSSL/crypto/crypto.c:285: warning: implicit declaration of function ‘crypto_X509_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_dump_certificate’:
OpenSSL/crypto/crypto.c:302: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:302: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:312: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:313: warning: implicit declaration of function ‘PEM_write_bio_X509’
OpenSSL/crypto/crypto.c:313: error: ‘crypto_X509Obj’ has no member named ‘x509’
OpenSSL/crypto/crypto.c:316: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:317: warning: implicit declaration of function ‘i2d_X509_bio’
OpenSSL/crypto/crypto.c:317: error: ‘crypto_X509Obj’ has no member named ‘x509’
OpenSSL/crypto/crypto.c:321: warning: implicit declaration of function ‘X509_print_ex’
OpenSSL/crypto/crypto.c:321: error: ‘crypto_X509Obj’ has no member named ‘x509’
OpenSSL/crypto/crypto.c: In function ‘crypto_load_certificate_request’:
OpenSSL/crypto/crypto.c:355: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c:358: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:358: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:359: error: ‘X509_REQ’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:359: error: ‘req’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:367: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:368: warning: implicit declaration of function ‘PEM_read_bio_X509_REQ’
OpenSSL/crypto/crypto.c:371: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:372: warning: implicit declaration of function ‘d2i_X509_REQ_bio’
OpenSSL/crypto/crypto.c:388: warning: implicit declaration of function ‘crypto_X509Req_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_dump_certificate_request’:
OpenSSL/crypto/crypto.c:405: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:405: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:415: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:416: warning: implicit declaration of function ‘PEM_write_bio_X509_REQ’
OpenSSL/crypto/crypto.c:416: error: ‘crypto_X509ReqObj’ has no member named ‘x509_req’
OpenSSL/crypto/crypto.c:419: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:420: warning: implicit declaration of function ‘i2d_X509_REQ_bio’
OpenSSL/crypto/crypto.c:420: error: ‘crypto_X509ReqObj’ has no member named ‘x509_req’
OpenSSL/crypto/crypto.c:424: warning: implicit declaration of function ‘X509_REQ_print_ex’
OpenSSL/crypto/crypto.c:424: error: ‘crypto_X509ReqObj’ has no member named ‘x509_req’
OpenSSL/crypto/crypto.c: In function ‘crypto_load_crl’:
OpenSSL/crypto/crypto.c:460: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:460: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:461: error: ‘X509_CRL’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:461: error: ‘crl’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:469: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:470: warning: implicit declaration of function ‘PEM_read_bio_X509_CRL’
OpenSSL/crypto/crypto.c:473: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:474: warning: implicit declaration of function ‘d2i_X509_CRL_bio’
OpenSSL/crypto/crypto.c:489: warning: implicit declaration of function ‘crypto_CRL_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_load_pkcs7_data’:
OpenSSL/crypto/crypto.c:505: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:505: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:506: error: ‘PKCS7’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:506: error: ‘pkcs7’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:517: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:518: warning: implicit declaration of function ‘PEM_read_bio_PKCS7’
OpenSSL/crypto/crypto.c:521: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:522: warning: implicit declaration of function ‘d2i_PKCS7_bio’
OpenSSL/crypto/crypto.c:541: warning: implicit declaration of function ‘crypto_PKCS7_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_load_pkcs12’:
OpenSSL/crypto/crypto.c:557: error: ‘BIO’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:557: error: ‘bio’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:558: error: ‘PKCS12’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:558: error: ‘p12’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:564: warning: implicit declaration of function ‘d2i_PKCS12_bio’
OpenSSL/crypto/crypto.c:572: warning: implicit declaration of function ‘crypto_PKCS12_New’
OpenSSL/crypto/crypto.c: In function ‘crypto_X509_verify_cert_error_string’:
OpenSSL/crypto/crypto.c:592: warning: implicit declaration of function ‘X509_verify_cert_error_string’
OpenSSL/crypto/crypto.c:592: warning: assignment makes pointer from integer without a cast
OpenSSL/crypto/crypto.c: In function ‘crypto_sign’:
OpenSSL/crypto/crypto.c:623: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:623: error: ‘digest’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:624: error: ‘EVP_MD_CTX’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:624: error: expected ‘;’ before ‘md_ctx’
OpenSSL/crypto/crypto.c:633: warning: implicit declaration of function ‘EVP_get_digestbyname’
OpenSSL/crypto/crypto.c:638: warning: implicit declaration of function ‘EVP_SignInit’
OpenSSL/crypto/crypto.c:638: error: ‘md_ctx’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:639: warning: implicit declaration of function ‘EVP_SignUpdate’
OpenSSL/crypto/crypto.c:641: warning: implicit declaration of function ‘EVP_SignFinal’
OpenSSL/crypto/crypto.c:641: error: ‘crypto_PKeyObj’ has no member named ‘pkey’
OpenSSL/crypto/crypto.c: In function ‘crypto_verify’:
OpenSSL/crypto/crypto.c:669: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:669: error: ‘digest’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:670: error: ‘EVP_MD_CTX’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:670: error: expected ‘;’ before ‘md_ctx’
OpenSSL/crypto/crypto.c:671: error: ‘EVP_PKEY’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:671: error: ‘pkey’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:686: warning: implicit declaration of function ‘X509_get_pubkey’
OpenSSL/crypto/crypto.c:686: error: ‘crypto_X509Obj’ has no member named ‘x509’
OpenSSL/crypto/crypto.c:692: warning: implicit declaration of function ‘EVP_VerifyInit’
OpenSSL/crypto/crypto.c:692: error: ‘md_ctx’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:693: warning: implicit declaration of function ‘EVP_VerifyUpdate’
OpenSSL/crypto/crypto.c:694: warning: implicit declaration of function ‘EVP_VerifyFinal’
OpenSSL/crypto/crypto.c:695: warning: implicit declaration of function ‘EVP_PKEY_free’
OpenSSL/crypto/crypto.c: In function ‘locking_function’:
OpenSSL/crypto/crypto.c:741: error: ‘CRYPTO_LOCK’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c: In function ‘init_openssl_threads’:
OpenSSL/crypto/crypto.c:758: warning: implicit declaration of function ‘CRYPTO_num_locks’
OpenSSL/crypto/crypto.c:765: warning: implicit declaration of function ‘CRYPTO_set_id_callback’
OpenSSL/crypto/crypto.c:766: warning: implicit declaration of function ‘CRYPTO_set_locking_callback’
OpenSSL/crypto/crypto.c: In function ‘initcrypto’:
OpenSSL/crypto/crypto.c:814: warning: implicit declaration of function ‘ERR_load_crypto_strings’
OpenSSL/crypto/crypto.c:815: warning: implicit declaration of function ‘OpenSSL_add_all_algorithms’
OpenSSL/crypto/crypto.c:829: error: ‘crypto_X509_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:830: error: ‘crypto_X509Name_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:831: error: ‘crypto_X509Req_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:832: error: ‘crypto_X509Store_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:833: error: ‘crypto_PKey_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:835: error: ‘crypto_PKCS7_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:836: error: ‘crypto_NetscapeSPKI_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:848: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:849: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:852: error: ‘EVP_PKEY_RSA’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:853: error: ‘EVP_PKEY_DSA’ undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
有人知道原因吗?
系统:Ubuntu 10.04
最佳答案
必须安装 SSL 开发库
CentOS:
$ yum install openssl-devel libffi-devel
Ubuntu:
$ apt-get install libssl-dev libffi-dev
OS X(安装了 Homebrew):
$ brew install openssl
关于python - 如何为 Python 安装 OpenSSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9001316/
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub