instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.54k stars 2.46k forks source link

Bundle Install fails - instructure/nokogiri-xmlsec-me-harder #1026

Closed ebrohman closed 7 years ago

ebrohman commented 7 years ago

On branch stable, bundle install fails on OSX EL Capitan. Is there a workaround. I see in app.rb this line of interest:

gem 'nokogiri-xmlsec-me-harder', '0.9.3pre', require: false, github: 'instructure/nokogiri-xmlsec-me-harder', ref: '57d071040cc4649db9f158e09bbcea028271a4a6'

Is there a way to successfully bundle install? Error:

Fetching https://github.com/instructure/nokogiri-xmlsec-me-harder.git
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies.........
Using rake 12.0.0
Using i18n 0.7.0
Using minitest 5.10.1
Using thread_safe 0.3.6
Using multi_xml 0.6.0
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using mime-types 1.25.1
Using arel 6.0.4
Using bundler 1.14.3
Using thor 0.19.4
Using concurrent-ruby 1.0.5
Using public_suffix 2.0.5
Using statsd-ruby 1.3.0
Using ast 2.3.0
Using request_store 1.3.2
Using ffi 1.9.14
Using autoextend 1.0.0 from source at `gems`
Using extlib 0.9.16
Using multi_json 1.12.1
Using jmespath 1.3.1
Using barby 0.6.5
Using bcrypt 3.1.11
Using bindata 2.4.0
Using bluecloth 2.2.0
Using folio-pagination 0.0.12
Using json 2.0.3
Using will_paginate 3.1.5
Using brakeman 3.6.1
Using byebug 9.0.6
Using canvas_breach_mitigation 0.0.1 from source at `gems/canvas_breach_mitigation`
Using simple_uuid 0.4.0
Using thrift 0.8.0
Using canvas_color 0.0.1 from source at `gems/canvas_color`
Using canvas_crummy 0.0.1 from source at `gems/canvas_crummy`
Using canvas_http 1.0.0 from source at `gems/canvas_http`
Using canvas_slug 0.0.1 from source at `gems/canvas_slug`
Using canvas_sort 1.0.0 from source at `gems/canvas_sort`
Using canvas_mimetype_fu 0.0.1 from source at `gems/canvas_mimetype_fu`
Using jwt 1.2.1
Using pg 0.19.0
Using iconv 1.0.4
Using rubyzip 1.2.0
Using chunky_png 1.3.8
Using coderay 1.1.1
Using coffee-script-source 1.6.2
Using execjs 2.7.0
Using colored 1.2
Using colorize 0.8.1
Using connection_pool 2.2.1
Using safe_yaml 1.0.4
Using sqlite3 1.3.13
Using daemons 1.2.4
Using diff-lcs 1.3
Using multipart-post 2.0.0
Using docile 1.1.5
Using mustache 1.0.3
Using redcarpet 3.4.0
Using dynamic_form 1.1.4
Using escape_code 0.2
Using eventmachine 1.2.1
Using formatador 0.2.5
Using globby 0.1.2
Using retriable 1.4.1
Using rb-fsevent 0.9.8
Using ruby_dep 1.5.0
Using lumberjack 1.0.11
Using nenv 0.3.0
Using shellany 0.0.1
Using method_source 0.8.2
Using slop 3.6.0
Using sexp_processor 4.4.5
Using ya2yaml 0.31
Using hashdiff 0.3.2
Using hashery 2.1.2
Using headless 2.3.1
Using hey 1.3.0
Using highline 1.7.8
Using icalendar 1.5.4
Using simple_oauth 0.2.0
Using redis 3.3.1
Using iso8601 0.9.1
Using jira_ref_parser 1.0.1
Using securecompare 1.0.0
Using url_safe_base64 0.2.2
Using oauth-instructure 0.4.10
Using metaclass 0.0.4
Using mini_magick 4.2.7
Using rdiscount 1.6.8
Using net-ldap 0.10.1
Using netaddr 1.5.1
Using oj 2.17.1
Using oj_mimic_json 1.0.1
Using rspec-support 3.5.0
Using open4 1.3.4
Using parallel 1.10.0
Using powerpack 0.1.1
Using rainbow 2.2.1
Using soap4r-ruby1.9 2.0.0
Using ritex 1.0.1
Using rotp 3.3.0
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.2.1
Using websocket 1.2.3
Using simplecov-html 0.9.0
Using stringify_ids 1.0.0 from source at `gems/stringify_ids`
Using test-queue 0.2.13 from https://github.com/jenseng/test-queue.git (at 1b92ebb@1b92ebb)
Using testrail_client 0.0.1
Using timecop 0.8.1
Using useragent 0.16.8
Using yard 0.9.5
Using canvas_text_helper 0.0.1 from source at `gems/canvas_text_helper`
Using tzinfo 1.2.2
Using httparty 0.14.0
Using nokogiri 1.7.0.1
Using rack-test 0.6.3
Using mail 2.6.4
Using sprockets 3.7.1
Using addressable 2.5.0
Using parser 2.4.0.0
Using ffi-compiler 1.0.1
Using childprocess 0.5.9
Using ffi-icu 0.1.10
Using rb-inotify 0.9.7
Using pygments.rb 1.1.1
Using rails-patch-json-encode 0.0.1
Using aws-sdk-core 2.6.7
Using json_token 0.0.1 from source at `gems/json_token`
Using crocodoc-ruby 0.0.1
Using vericite_api 1.2.0
Using paginated_collection 1.0.0 from source at `gems/paginated_collection`
Using thrift_client 0.8.4
Using multipart 0.0.1 from source at `gems/multipart`
Using canvas_panda_pub 1.0.0 from source at `gems/canvas_panda_pub`
Using twilio-ruby 4.2.1
Using utf8_cleaner 0.0.1 from source at `gems/utf8_cleaner`
Using canvas_unzip 0.0.1 from source at `gems/canvas_unzip`
Using rqrcode 0.10.1
Using coffee-script 2.4.1
Using net-http-persistent 3.0.0
Using crack 0.4.3
Using csv_diff 1.0.0 from source at `gems/csv_diff`
Using faraday 0.9.2
Using thin 1.7.0
Using notiffany 0.1.1
Using pry 0.10.4
Using ruby_parser 3.8.4
Using redis-scripting 1.0.1
Using redis-store 1.1.4 from https://github.com/ccutrer/redis-store.git (at 72db36c@72db36c)
Using lti_outbound 0.0.1 from source at `gems/lti_outbound`
Using mocha 1.1.0 from https://github.com/maneframe/mocha.git (at bb8813f@bb8813f)
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using soap4r-middleware 0.8.3
Using simplecov 0.9.2
Using yard-appendix 0.1.8
Using activesupport 4.2.8
Using rufus-scheduler 3.3.3
Using gergich 0.1.13
Using loofah 2.0.3
Using sanitize 2.1.0
Using diigo 1.0.0 from source at `gems/diigo`
Using gepub 0.7.0beta3 from https://github.com/ccutrer/gepub.git (at 7cea2f4@7cea2f4)
Using instructure-happymapper 0.5.10
Using linked_in 1.0.0 from source at `gems/linked_in`
Using nokogiri-xmlsec-me-harder 0.9.3pre from https://github.com/instructure/nokogiri-xmlsec-me-harder.git (at 57d0710@57d0710)
Using ratom-nokogiri 0.10.5
Using ruby-saml-mod 0.3.2
Using autoparse 0.3.3
Using launchy 2.4.3
Using rubocop 0.47.1
Using scrypt 3.0.3
Using selenium-webdriver 2.53.4
Using listen 3.1.5
Using dress_code 1.0.2 from https://github.com/colleenpalmer/dress_code.git (at master@5743821)
Using aws-sdk-resources 2.6.7
Using cassandra-cql 1.2.2 from https://github.com/kreynolds/cassandra-cql.git (at fa9e425@fa9e425)
Using canvas_kaltura 1.0.0 from source at `gems/canvas_kaltura`
Using webmock 2.3.2
Using diplomat 1.0.0
Using faraday_middleware 0.11.0.1
Using signet 0.6.0
Using oauth2 1.0.0
Using sentry-raven 0.15.6
Using ruby2ruby 2.3.1
Using redis-rack 1.5.0
Using rspec-collection_matchers 1.1.3
Using rspec 3.5.0
Using simplecov-rcov 0.2.3
Using academic_benchmarks 0.0.9
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.4.0
Using activemodel 4.2.8
Using activesupport-json_encoder 1.1.0
Using activesupport-suspend_callbacks 0.0.1 from source at `gems/activesupport-suspend_callbacks`
Using adobe_connect 1.0.5
Using canvas_ext 1.0.0 from source at `gems/canvas_ext`
Using canvas_time 1.0.0 from source at `gems/canvas_time`
Using json-jwt 1.6.5
Using redis-activesupport 4.1.5
Using ruby-duration 3.2.3
Using rubycas-client 2.3.9
Using shoulda-matchers 3.1.1
Using spring 2.0.0
Using rails-html-sanitizer 1.0.3
Using html_text_helper 0.0.1 from source at `gems/html_text_helper`
Using canvas_sanitize 0.0.1 from source at `gems/canvas_sanitize`
Using moodle2cc 0.2.37
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/eric/.rvm/gems/ruby-2.3.1/bundler/gems/nokogiri-xmlsec-me-harder-57d071040cc4/ext/nokogiri_ext_xmlsec
/Users/eric/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20170419-45369-nirpl1.rb extconf.rb
checking for ruby.h... yes
*** 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
        --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=/Users/eric/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
        --with-xmlsec1-config
        --without-xmlsec1-config
        --with-pkg-config
        --without-pkg-config
extconf.rb:10:in ``': No such file or directory - xmlsec1-config (Errno::ENOENT)
        from extconf.rb:10:in `<main>'
ebrohman commented 7 years ago

Fix for me was to:

brew install libxmlsec1
ralphotowo commented 7 years ago

I have the same error on Ubuntu 16.04. Anyone with a fix? apt-get install libxmlsec1 doesn't fix it.

The solution: sudo apt-get install libxmlsec1-dev

Macpeters commented 7 years ago

I did brew install libxmlsec1 but still getting the following error on bundle: An error occurred while installing nokogiri-xmlsec-me-harder (0.9.3pre), and Bundler cannot continue. Make sure that `gem install nokogiri-xmlsec-me-harder -v '0.9.3pre'` succeeds before bundling. Is there any other fix?

hola-there commented 6 years ago

This was the fix for me the MAKEFILE kept failing to be created due to a missing -lltdl which I think is a dependency to the xmlsec1-openssl lib:

yum install libtool-ltdl-devel

I also noted this when I figured it out in the instructure/nokogiri-xmlsec-me-harder repository: Link: https://github.com/instructure/nokogiri-xmlsec-instructure/pull/4/commits/5fbaa9214268f380008f06e84d3d29d390df34da

This is mainly for RHEL/CentOS systems though...

zawhtutwin commented 6 years ago

The fix for me was yum install xmlsec1-devel

slaughter550 commented 5 years ago

On OSX, brew install postgresql solves the second set of problems

rickgladwin commented 4 years ago

For anyone finding this through a search, the solution: brew install libxmlsec1

also works for this error:

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

nasht commented 3 years ago

As this is the first Google hit for nokogiri-xmlsec-instructure issue , the below may also save some headaches for folks.

On MacOS it looks like this gem doesn't compile with Xcode 12's command line tools. In addition to the above advice (libxmlsec1 and postgresql), you may also need to install Xcode11.7 and set command line tools to point to that version when running bundle:

image
skeebuzz commented 3 years ago

@nasht Thanks! The command line tools thing was it for me! Never would've figured that out on my own... 🙄

bazay commented 3 years ago

@nasht 's comment worked for me by downloading Xcode11.7 from Apple, then running the following in my terminal:

sudo xcode-select -switch <path/to/>Xcode.app

Source for above NOTE* Don't forget to switch back to your latest Xcode once you install the gem

gregawoods commented 3 years ago

I was having similar issues on red hat 8. The key was enabling another repo that contained the necessary xmlsec1-devel dependency.

sudo yum-config-manager --enable codeready-builder-for-rhel-8-rhui-rpms
sudo yum install xmlsec1 xmlsec1-devel
danieldraper commented 1 year ago

Recently was having an issue getting nokogiri-xmlsec-instructure built and installed, this was the first search result. Just wanted to leave an updated solution that worked for me with macOS Ventura (Apple M1 Silicon) and Xcode 14 https://stackoverflow.com/questions/74554406/undefined-symbols-for-architecture-arm64-building-nokogiri-xmlsec-instructure-ru/.