首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ubuntu 20.04包中的Canvas-lms安装节约错误

ubuntu 20.04包中的Canvas-lms安装节约错误
EN

Stack Overflow用户
提问于 2022-04-19 07:30:01
回答 1查看 189关注 0票数 0

我需要在ubuntu 20.04中安装canvas稳定/2018-12-08

我有:

  • rbenv
  • ruby 2.4.0
  • bundler 1.16.4

我知道这个错误:

代码语言:javascript
运行
复制
Installing thrift 0.9.3.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/jxd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thrift-0.9.3.0/ext /home/jxd/.rbenv/versions/2.4.0/bin/ruby -I /home/jxd/.rbenv/versions/2.4.0/lib/ruby/site_ruby/2.4.0 -r ./siteconf20220417-4132-wc9kcv.rb extconf.rb 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=/home/jxd/.rbenv/versions/2.4.0/bin/$(RUBY_BASE_NAME) /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:542:in `try_link0' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:557:in `try_link' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:768:in `try_func' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:1055:in `block in have_func' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:321:in `open' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:321:in `open' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:347:in `postpone' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for' from /home/jxd/.rbenv/versions/2.4.0/lib/ruby/2.4.0/mkmf.rb:1054:in `have_func' from extconf.rb:31:in `<main>'

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

  /home/jxd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/thrift-0.9.3.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/jxd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thrift-0.9.3.0 for inspection. Results logged to /home/jxd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/thrift-0.9.3.0/gem_make.out

An error occurred while installing thrift (0.9.3.0), and Bundler cannot continue. Make sure that `gem install thrift -v '0.9.3.0'
--source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:   event_stream was resolved to 0.0.1, which depends on
    canvas_cassandra was resolved to 0.0.1, which depends on
      cassandra-cql was resolved to 1.2.3, which depends on
        thrift_client was resolved to 0.9.3, which depends on
          thrift

我遵循了在canvas文档中找到的方向:

代码语言:javascript
运行
复制
~/canvas$ bundle config build.thrift --with-cppflags='-D_FORTIFY_SOURCE=0'
代码语言:javascript
运行
复制
gem install thrift -v 0.8.0 -- --with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value\"
代码语言:javascript
运行
复制
~/canvas$ bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include

不工作

EN

回答 1

Stack Overflow用户

发布于 2022-04-19 10:27:35

我切换到ruby 2.5.0 (升级)和bundler 1.13.3 (降级)。对我来说很管用。

我不明白,但它有效。

更新..。

"--with-cppflags="-Wno-compound-token-split-by-macro"“&& bundle安装工作?- build.thrift?-剃须刀?

工作但使用ruby 2.5.0

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71921146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档