Install issues (Ubuntu Linux 12.04.5)

370 views
Skip to first unread message

Tony

unread,
Jul 5, 2016, 5:50:09 AM7/5/16
to Canvas LMS Users
There seems to be some exception to the instructions no matter which Ubuntu version I used. (I've tried 12.04, 14.04). For the official instruction using 12.04 (our system is Ubuntu Linux 12.04.5; Linux 2.6.32-042stab113.21 on x86_64), I am following the production script almost to the T. No matter what I do, something seems to go wrong.

Obviously, many people are installing Canvas themselves it shouldn't be this difficult. Is there a specific version of Ubuntu 12.04 that we need to obtain? Are there updated instructions since it seems that https://github.com/instructure/canvas-lms/wiki/Production-Start is out of date?

Any help is appreciative!

The problems:
Firstly, the version of bundler is wrong and it won't continue with version 1.7.11 (version 1.8.0 or later is required).
sysadmin@appserver:/var/canvas$ sudo gem install bundler --version 1.7.11
sysadmin@appserver:/var/canvas$ bundle install --path vendor/bundle

Once I removed 1.711 and ran sudo gem install bundler --version 1.8.0, things moved on.

The next real problem is with: npm install
There are all kinds of warnings in the npm install for deprecated packages. But, the npm install did ultimately fail (see snipped below, full log attached). Since it said Binary is fine; exiting. I thought by some chance this was ok.

Following that, RAILS_ENV=production bundle exec rake canvas:compile_assets has errors during configuration and then aborts all together.
  1. First, it encounter an error on tar (child): bzip2: Cannot exec: No such file or directory, but continued. 
  2. Then the script halted on:  /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:31:in `scan': invalid byte sequence in US-ASCII (ArgumentError)

npm fail log:
` /var/canvas/node_modules/brandable_css/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists.
 testing binary.
Binary is fine; exiting.
npm ERR! Linux 2.6.32-042stab113.21
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.15
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! phantomjs...@2.1.7 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.7 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/canvas/npm-debug.log

First rake error:
--> Starting: 'Making sure node_modules are up to date'
Error extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Last rake error::
--> creating styleguide
/var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:31:in `scan': invalid byte sequence in US-ASCII (ArgumentError)
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:31:in `scan'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:25:in `parse_file'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:20:in `block in parse_files'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:20:in `each'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:20:in `flat_map'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:20:in `parse_files'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/lib/dress_code/extractor.rb:15:in `extract'
        from /var/canvas/vendor/bundle/ruby/2.1.0/bundler/gems/dress_code-574382160ee4/bin/dress_code:88:in `<top (required)>'
        from bin/dress_code:16:in `load'
        from bin/dress_code:16:in `<main>'
rake aborted!
Undumpable Exception -- #<RuntimeError: error running dress_code>
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:63:in `work'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:280:in `block (4 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:447:in `with_instrumentation'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:279:in `block (3 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `loop'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `block (2 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:138:in `block (2 levels) in in_threads'
Tasks: TOP => canvas:compile_assets
(See full trace by running task with --trace)

npm error.txt
rake error.txt

Tony

unread,
Jul 5, 2016, 6:05:24 AM7/5/16
to Canvas LMS Users
I got post 1 error by running:

sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

 But, then it was followed up by another one. Any ideas?

Building client app 'canvas_quizzes'
        Running 'npm install'...
npm WARN package.json canvas_...@1.0.0 No license field.
npm ERR! git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb: Cloning into bare repository '/home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb'...
npm ERR! git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb:
npm ERR! git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb: fatal: unable to connect to github.com:
npm ERR! git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb: github.com[0: 192.30.253.113]: errno=Connection timed out
npm ERR! Linux 2.6.32-042stab113.21
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.15
npm ERR! npm  v2.15.1
npm ERR! code 128

npm ERR! Command failed: git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=Connection timed out
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:

npm ERR! Please include the following file with any support request:
npm ERR!     /var/canvas/client_apps/canvas_quizzes/npm-debug.log
            -------------------------------------------------------------------
            INSTALL FAILURE:

            -------------------------------------------------------------------
rake aborted!
Undumpable Exception -- #<RuntimeError: Package installation failure for client app canvas_quizzes>
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:63:in `work'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:280:in `block (4 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:447:in `with_instrumentation'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:279:in `block (3 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `loop'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `block (2 levels) in work_in_processes'
/var/canvas/vendor/bundle/ruby/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:138:in `block (2 levels) in in_threads'
Tasks: TOP => canvas:compile_assets
(See full trace by running task with --trace)

Graham Ballantyne

unread,
Jul 5, 2016, 12:47:58 PM7/5/16
to canvas-l...@googlegroups.com
According to your error log, it looks like your server can't connect to github.com:

npm ERR! Command failed: git clone --template=/home/canvas_admin/.npm/_git-remotes/_templates --mirror git://github.com/amireh/grunt-template-jasmine-requirejs.git /home/canvas_admin/.npm/_git-remotes/git-github-com-amireh-grunt-template-jasmine-requirejs-git-c6cc13eb
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=Connection timed out

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Graham Ballantyne
IT Services
Simon Fraser University

Ola B

unread,
Feb 19, 2018, 9:14:48 AM2/19/18
to Canvas LMS Users
The solution for this failure to connect to github.com, mainly due to firewall issues, has been discussed as an solved issue under npm on github: 
Regards,
Ola B.
Reply all
Reply to author
Forward
0 new messages