Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sure how to install to path? #2210

Closed
oluoluoxenfree opened this issue Feb 12, 2015 · 14 comments
Closed

Not sure how to install to path? #2210

oluoluoxenfree opened this issue Feb 12, 2015 · 14 comments

Comments

@oluoluoxenfree
Copy link

Read this http://help.exercism.io/understanding-path.html still not completely sure what I'd have to do in linux as I assume one of the PATHs written is a placeholder?

Thanks for any advice!

@kytrinyx
Copy link
Member

The most important thing is that you need to add the location of the exercism binary into your path.

Assuming that the binary is at ~/bin/exercism, this line will accomplish that:

export PATH=~/bin:$PATH

In order to not have to type this every time you open a new shell window, it's common to write that into your shell configuration (e.g. .bashrc, or .bash_profile, or .zshrc, or similar).

Let me know if you're still confused, I'll try explaining in a different way.

@oluoluoxenfree
Copy link
Author

I think I've actually gotten stuck before my question implies, I've downloaded the tar ball and gotten an executable that doesn't execute on clicking, is that what I should be moving to path?

I didn't understand much of what you wrote, but I'll google some terms and come back to you.

I assume the shell configuration is written in a hidden file?

@kytrinyx
Copy link
Member

Ah, yeah, that makes sense. The binary doesn't work by clicking, it's one of those run-on-the-command-line things.

Here are the steps you need:

Make sure that you have a ~/bin directory:

mkdir -p ~/bin

Then move the exercism binary that you got out of the tarball into the ~/bin directory. I don't know where the binary is on your system right now, but let's pretend it's in ~/Desktop/exercism:

mv ~/Desktop/exercism ~/bin/

I assume the shell configuration is written in a hidden file?

Yeah, usually in your home directory. See what you can find with ls -a | grep "^\."

There's a video that shows the install process for mac, which is similar enough to linux that it would probably help: https://www.youtube.com/watch?v=TCT4eHGwfaE

@oluoluoxenfree
Copy link
Author

Thanks the video really helped (as well as explainshell.com, ha ha), thank you.

@kytrinyx
Copy link
Member

explainshell.com is great :)

@gitgis42o
Copy link

I set up the bin folder. After reloading the session I still get the result:

"me >>>exercism -v
-bash: /Users/me/bin/exercism: cannot execute binary file"

I've navigated to the bin folder through the command line and exercism is there. I'm not quite sure what error couldn't have occurred. Any help? Searches lead me to a thread on here that doesn't address the error (or at least I haven't found it).

Thank you!

@kotp
Copy link
Member

kotp commented Jul 19, 2016

chmod +x ~/bin/exercism may be the thing you need to do...

@kytrinyx
Copy link
Member

@gitgis42o What operating system do you use? How did you download the executable?

@gitgis42o
Copy link

gitgis42o commented Jul 20, 2016

Katrina,

I use OS X El Capitan on my Mac (Version 10.11.5). I downloaded the latest release via Github. That's when I moved the executable into the newly created bin folder.

@kytrinyx
Copy link
Member

@gitgis42o Which one did you download? Would you try with this one just to be sure? https://github.com/exercism/cli/releases/download/v2.2.6/exercism-mac-64bit.tgz

@gitgis42o
Copy link

I ended up searching around long enough to find something that worked. I believe the file I downloaded was correct.

I ended up using the commands
$ curl -O https://raw.githubusercontent.com/exercism/cli-www/master/public/install
$ chmod +x install
$ ./install

from http://cli.exercism.io/

I just submitted my hello_world.py!

Thank you for writing this stuff. I'm happy to finally get this going after having it on the docket for so long.

@kytrinyx
Copy link
Member

Yay! So glad you got it sorted, and so sorry that it was so painful getting started.

@leorawe
Copy link

leorawe commented Aug 16, 2018

I agree with gitgis42o - this should really be part of the installation instructions. An alternative to homebrew.
$ curl -O https://raw.githubusercontent.com/exercism/cli-www/master/public/install
$ chmod +x install
$ ./install

@iHiD
Copy link
Member

iHiD commented Aug 16, 2018

@leorawe FYI. This discussion is two years old and that repository (and probably scripts) are deprecated and probably don't work. The walkthrough on the exercism website has instructions both with and without Brew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants