Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

509
Views
Unable to run spark-shell from bin

I'm new to spark, I downloaded precompiled spark.

When I try to run spark-shell from bin folder on command line, it returns

:cd /users/denver/spark-1.6/bin
:spark-shell

command not found

But if I run it like

:cd /users/denver/spark-1.6
:./bin/spark-shell

it launches spark ..

can you please let me know why it is throwing error in the 1st case

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The reason why you can not run the spark-shell command in first case is because of environment variable

The terminal searches for executables in $PATH. This is a Unix environment variable that lists directories containing system binaries (such as ls, echo, or gcc). If you call an executable that's not in a $PATH directory (such as spark-shell), you need to indicate its absolute path in the file system.

In the terminal . is a synonym for the current working directory, thus ./bin/spark-shell can work properly. You could equally well call ./some/path/bin/spark-shell.

Hope it helps.

over 4 years ago · Santiago Trujillo Report

0

In linux:

Add to your ~/.bashrc

export SPARK_HOME=/home/das/spark-1.6.2-bin-hadoop2.6 export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin

Source ~/.bashrc. Relaunch terminal then spark-shell works from anywhere If it doesn't work add to ~/.profile

over 4 years ago · Santiago Trujillo Report

0

This happened to me too. Using ./bin/spark-shell after changing to the spark directory should solve the issue.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!