簡體   English   中英

gem install bcrypt (gcc: error:) 在 Ubuntu 16.04 上

[英]gem install bcrypt (gcc: error:) on Ubuntu 16.04

什么地方出了錯? 嘗試gem install bcryptgem install bcrypt-ruby ,並得到相同的結果。 由於此錯誤,無法在 ruby​​ on rails 中進行捆綁安裝。

sylviachoong@sylviachoong:~/Desktop/postco$ gem install bcrypt-ruby
Building native extensions. This could take a while...
ERROR:  Error installing bcrypt-ruby:
        ERROR: Failed to build gem native extension.

    current directory: /home/sylviachoong/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bcrypt- 3.1.12/ext/mri
/home/sylviachoong/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20180526-3491-4idkgq.rb extconf.rb
creating Makefile

current directory: /home/sylviachoong/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bcrypt-3.1.12/ext/mri
make "DESTDIR=" clean

current directory: /home/sylviachoong/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bcrypt- 
3.1.12/ext/mri
make "DESTDIR="
compiling bcrypt_ext.c
gcc: error: unrecognized command line option '-Wmisleading-indentation'
gcc: error: unrecognized command line option '-Wduplicated-cond'
Makefile:241: recipe for target 'bcrypt_ext.o' failed
make: *** [bcrypt_ext.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/sylviachoong/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bcrypt-3.1.12 for inspection.
Results logged to /home/sylviachoong/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/bcrypt-3.1.12/gem_make.out

首先運行此命令然后安裝 gem

sudo apt-get install libmagickwand-dev

運行rbenv install 2.5.1gem install bundlerrbenv rehash

固定的。

發出命令bundle update bcrypt

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM