Canopy installation error in ubuntu - canopy

While trying to install canopy I got following error
ubuntu#hari-desktop:~/Downloads$ sh canopy-2.1.3.rh6-x86_64-cp27.sh
canopy-2.1.3.rh6-x86_64-cp27.sh: 32: canopy-2.1.3.rh6-x86_64-cp27.sh: 0: not found
canopy-2.1.3.rh6-x86_64-cp27.sh: 46: canopy-2.1.3.rh6-x86_64-cp27.sh: 0: not found
canopy-2.1.3.rh6-x86_64-cp27.sh: 154: canopy-2.1.3.rh6-x86_64-cp27.sh: Syntax error: word unexpected (expecting ")")

Solution: run using bash: bash canopy-2.1.3.rh6-x86_64-cp27.sh

Related

List directories in localhost using lftp cmd

I'm trying to copy a file to a folder in localhost using lftp command but I'm having troubles executing commands.
When I try to list folders in a directory using : !dir;
I get the following error : stderr: 1. bash.exe: warning: could not find /tmp, please create! 2. sh: -c: line 0: syntax error near unexpected token ;;' 3. sh: -c: line 0: dir;;

Anyone know how to fix hadoop-functions.sh "syntax error near unexpected token `<'"?

I've configured Hadoop 3.1.1 on my MacPro running OSX 10.14.2, and I'm getting the following error when I run start-all.sh
$ sudo /usr/local/Cellar/hadoop/3.1.1/sbin/start-all.sh
Starting namenodes on [localhost]
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: syntax error near unexpected token `<'
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: ` done < <(for text in "${input[#]}"; do'
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 70: hadoop_deprecate_envvar: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 87: hadoop_bootstrap: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 104: hadoop_parse_args: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 105: shift: : numeric argument required
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 244: hadoop_need_reexec: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 252: hadoop_verify_user_perm: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 213: hadoop_validate_classname: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 214: hadoop_exit_with_usage: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 263: hadoop_add_client_opts: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 270: hadoop_subcommand_opts: command not found
/usr/local/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 273: hadoop_generic_java_subcmd_handler: command not found
Same issues starting the datanodes, secondary namenodes, resourcemanager, and nodemanagers.
I have found a similar bug reference online: https://issues.apache.org/jira/browse/HDFS-12571.
Update
After some debugging, the root cause is bash "< <(command)" syntax not being accepted for some reason. The bash versions on the system (/bin/bash and /usr/local/bin/bash from Homebrew) both work properly.
Maybe you should modify HDFS_NAMENODE_USER、HDFS_DATANODE_USER and so on in hadoop-env.sh to current user instead of root! Then before run the sudo ./start-all.sh command, you may need to recreate hdfs namenode with hdfs namenode -format.

Hadoop: start-dfs.sh throwing syntax errors

I am trying to start hadoop by running ./start-dfs.sh, but i am getting some syntax errors. Could anybody please help?
Gurupads-MacBook-Air:sbin guru$ sudo ./start-dfs.sh
Starting namenodes on [localhost]
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: syntax error near unexpected token `<'
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-functions.sh: line 398: ` done < <(for text in "${input[#]}"; do'
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 70: hadoop_deprecate_envvar: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 87: hadoop_bootstrap: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 104: hadoop_parse_args: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 105: shift: : numeric argument required
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 244: hadoop_need_reexec: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 252: hadoop_verify_user_perm: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 213: hadoop_validate_classname: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/hdfs: line 214: hadoop_exit_with_usage: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 263: hadoop_add_client_opts: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 270: hadoop_subcommand_opts: command not found
/Users/guru/homebrew/Cellar/hadoop/3.1.1/libexec/bin/../libexec/hadoop-config.sh: line 273: hadoop_generic_java_subcmd_handler: command not found
Starting datanodes
ERROR: Attempting to operate on hdfs datanode as root
ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
Starting secondary namenodes [Gurupads-MacBook-Air.local]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
2018-09-18 21:51:24,380 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
The error states that, you are running hdfs datanode as root user and there is no HDFS_DATANODE_USER is defined.
Solution:
Edit /Users/guru/homebrew/Cellar/hadoop/3.1.1/etc/hadoop/hadoop-env.sh file by adding below lines at the end of file:
export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
If you are using Yarn then you can add below lines in same file:
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root
Restart hadoop using start-dfs.sh script.

Cannot Install Meteor on command line Mac OSX

I'm trying to install Meteor on my Mac, following the instructions on their site (https://www.meteor.com/install)
curl https://install.meteor.com/ | sh
However, when I run the command, I get the following error:
sh: line 1: syntax error near unexpected token `newline'
sh: line 1: `<!DOCTYPE html>'
Pretty new to Terminal, so pointers appreciated.

Confusing Error message when using Brew

Every time when I run a brew command, it will give me several error lines at the beginning. I can't understand what's going on here. Can anyone tell me how I can get rid of the error?
brew
/bin/sh: __rvm_ruby_string_find: line 8: syntax error near unexpected token `('
/bin/sh: __rvm_ruby_string_find: line 8: ` ruby-+([1-9]) | ruby-+([1-9]).+([0-9]) | ruby-1.+([1-9]).+([0-9]) | jruby-[19]*)'
/bin/sh: error importing function definition for `__rvm_ruby_string_find'
/bin/sh: __rvm_project_ruby_env_load_parse_file: line 9: syntax error near unexpected token `('
/bin/sh: __rvm_project_ruby_env_load_parse_file: line 9: ` __rvm_read_lines __variables <( { cat "$1"; echo ""; } | __rvm_sed "${__sed_commands[#]}" )'
/bin/sh: error importing function definition for `__rvm_project_ruby_env_load_parse_file'
/bin/sh: __rvm_remove_without_gems: line 2: syntax error near unexpected token `('
/bin/sh: __rvm_remove_without_gems: line 2: ` __rvm_read_lines __gems_to_remove <('
/bin/sh: error importing function definition for `__rvm_remove_without_gems'
Now I found if I run an illegal command for ruby, it gives me a same error message. So is it because my version problem?
To my mind, you need to install ruby first as the errors you're receiving are coming from BASH (it is trying to parse the script as bash but doesn't succeed). Not sure how you managed to install Homebrew without ruby.
I've had this error due to RVM being source'ed during bash profile setup.
It seems the RVM script cannot handle being sourced multiple times into the same shell.
This was being triggered by commands like ssh-agent, which spawn a new sub-shell, or simply running bash again.
My solution was to wrap the RVM source'ing in my .bashrc with a check for the $rvm_version variable:
if [ -z "$rvm_version" ]; then
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
fi

Resources