Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Node/npm install on Linux Mint 17.3 Cinnamon Errors

Getting into the new Angular Basics course and it linked to Treehouse install notes (http://treehouse.github.io/installation-guides/linux/node-linux.html). Followed along the instructions and appended the .bashrc file as mentioned but getting errors when I test for node -v and/or npm -v. Additionally, the "brew install node" command returns an "unsupported special dependency" error. Not sure what to do from here. Browsed Linuxbrew on github for issues or other install notes and didn't come across anything.

 ~ $ node -v
 Could not find platform independent libraries <prefix>
 Could not find platform dependent libraries <exec_prefix>
 Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
 Fatal Python error: Py_Initialize: Unable to get the locale encoding
 ImportError: No module named 'encodings'

 Current thread 0x00007f331ecce740 (most recent call first):
 Aborted

 ~ $ npm -v
 Could not find platform independent libraries <prefix>
 Could not find platform dependent libraries <exec_prefix>
 Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
 Fatal Python error: Py_Initialize: Unable to get the locale encoding
 ImportError: No module named 'encodings'

 Current thread 0x00007fad63317740 (most recent call first):
 Aborted



 ~ $ brew install node
Error: Unsupported special dependency :perl
 Please report this bug:

https://github.com/Linuxbrew/linuxbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:123:in parse_symbol_spec' /home/chomskyhonk/.linuxbrew/Library/Homebrew/compat/dependency_collector.rb:17:inparse_symbol_spec' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:73:in parse_spec' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:61:inbuild' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in block in fetch' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:infetch' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:48:in fetch' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency_collector.rb:38:inadd' /home/chomskyhonk/.linuxbrew/Library/Homebrew/software_spec.rb:155:in depends_on' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula.rb:1862:inblock in depends_on' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula.rb:1862:in each' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula.rb:1862:independs_on' /home/chomskyhonk/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:37:in <class:Openssl>' /home/chomskyhonk/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb:4:inload_formula' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:21:in module_eval' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:21:inload_formula' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:34:in load_formula_from_path' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:83:inload_file' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:74:in klass' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:70:inget_formula' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formulary.rb:207:in factory' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency.rb:32:into_formula' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency.rb:93:in block in expand' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependencies.rb:9:ineach' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependencies.rb:9:in each' /home/chomskyhonk/.linuxbrew/Library/Homebrew/dependency.rb:80:inexpand' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula.rb:1223:in recursive_dependencies' /home/chomskyhonk/.linuxbrew/Library/Homebrew/requirement.rb:196:inexpand' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula.rb:1229:in recursive_requirements' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula_installer.rb:313:inexpand_requirements' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula_installer.rb:263:in compute_dependencies' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula_installer.rb:130:inverify_deps_exist' /home/chomskyhonk/.linuxbrew/Library/Homebrew/formula_installer.rb:123:in prelude' /home/chomskyhonk/.linuxbrew/Library/Homebrew/cmd/install.rb:231:ininstall_formula' /home/chomskyhonk/.linuxbrew/Library/Homebrew/cmd/install.rb:93:in block in install' /home/chomskyhonk/.linuxbrew/Library/Homebrew/cmd/install.rb:93:ineach' /home/chomskyhonk/.linuxbrew/Library/Homebrew/cmd/install.rb:93:in install' /home/chomskyhonk/.linuxbrew/Library/brew.rb:84:in<main>'

1 Answer

Undo whatever you did and try this

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

and verify node version by

nodejs --version

or

node --version

Thank you! This has me all set up. I'm guessing Treehouse's install instructions are out of date? Looks like the only thing it was good for was installing Linuxbrew; not sure I need that, but whatever. Appreciate your assistance!!