gpt4 book ai didi

ruby - Canvas LMS安装因节俭错误而失败

转载 作者:行者123 更新时间:2023-12-03 08:51:52 25 4
gpt4 key购买 nike

我正在尝试按照production start说明安装Canvas LMS。在 bundle 安装时,它在Thrift安装上失败。我在Mac系统中的docker上使用Ubuntu 16.04。一切工作正常,但是此错误使我无法启动系统。请帮我!

    Installing thrift 0.8.0 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /var/canvas/vendor/bundle/ruby/2.3.0/gems/thrift-0.8.0/ext
/usr/bin/ruby2.3 -r ./siteconf20160802-8582-f93j3i.rb extconf.rb --with-cppflags=-D_FORTIFY_SOURCE=0
checking for strlcpy() in string.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from /usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from /usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from /usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
from /usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
from extconf.rb:27:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/var/canvas/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/thrift-0.8.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/canvas/vendor/bundle/ruby/2.3.0/gems/thrift-0.8.0 for inspection.
Results logged to /var/canvas/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/thrift-0.8.0/gem_make.out
mkmf.log的输出是,
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -D_FORTIFY_SOURCE=0 -g -O2 -Wall -Werror conftest.c  -L. -L/usr/lib/x86_64-linux-\
gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */

最佳答案

尝试这个:

gem install thrift -v '0.8.0' -- --with-cppflags='-D_FORTIFY_SOURCE=0'

参见 Can't install thrift gem on OS X El Capitan

关于ruby - Canvas LMS安装因节俭错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38721186/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com