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

curl based installer needs to be improved (Ubuntu installation needs stuff in $Path) #213

Open
ghost opened this Issue May 13, 2016 · 13 comments

Comments

Projects
None yet
5 participants
@ghost

ghost commented May 13, 2016

I'm throwing the installation command in a Ubuntu terminal and get an error message.

Error: None of the items in $PATH are writable. Run with sudo or add a $PATH item that you have access to.

I ran the same command as sudo but to no avail. The documentation just says:

Once you have those installed and have made sure that they are on your PATH, you can get Lektor installed with our installation script

I have no idea how to do that and feel it is an unnecessary burden to make it a premise to install lektor.

Can't this be done by the script?

@javierdaza

This comment has been minimized.

Show comment
Hide comment
@javierdaza

javierdaza Jun 25, 2016

I had the same problem and this is what worked for me:

I created a virtualenv, activated and then run the curl command in it. The error message didn't show up and everything worked great. Didn't have to do anything with $PATH at all.

javierdaza commented Jun 25, 2016

I had the same problem and this is what worked for me:

I created a virtualenv, activated and then run the curl command in it. The error message didn't show up and everything worked great. Didn't have to do anything with $PATH at all.

@davidism

This comment has been minimized.

Show comment
Hide comment
@davidism

davidism Jun 25, 2016

Contributor

If you're creating a virtualenv, you might as well just pip install it. The recommendation is not to install Lektor in a virtualenv though. Modify PATH in ~/.bashrc to add .local/bin (or wherever you want) to your path. Then open a new terminal.

export PATH="$HOME/.local/bin:$PATH"

This should probably be included in the docs.

Contributor

davidism commented Jun 25, 2016

If you're creating a virtualenv, you might as well just pip install it. The recommendation is not to install Lektor in a virtualenv though. Modify PATH in ~/.bashrc to add .local/bin (or wherever you want) to your path. Then open a new terminal.

export PATH="$HOME/.local/bin:$PATH"

This should probably be included in the docs.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 26, 2016

Modify PATH in ~/.bashrc to add .local/bin (or wherever you want) to your path.

I have no idea what that means. The only instance of "path" in my .bashrc is in:

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

Where do I want to add .local/bin ?
Can't this be done automatically?

ghost commented Jun 26, 2016

Modify PATH in ~/.bashrc to add .local/bin (or wherever you want) to your path.

I have no idea what that means. The only instance of "path" in my .bashrc is in:

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

Where do I want to add .local/bin ?
Can't this be done automatically?

@davidism

This comment has been minimized.

Show comment
Hide comment
@davidism

davidism Jun 26, 2016

Contributor

You literally put that line at the end of the file. It should not be done automatically.

Contributor

davidism commented Jun 26, 2016

You literally put that line at the end of the file. It should not be done automatically.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 26, 2016

Here is what I did:

  1. open~/.bashrc
  2. add .local/bin
  3. open a terminal
  4. enter export PATH = "$HOME/.local/bin:$PATH"
  5. enter sudo curl -sf https://www.getlektor.com/install.sh | sh
  6. I get:
Welcome to Lektor

This script will install Lektor on your computer.

Error: None of the items in $PATH are writable. Run with sudo or add a $PATH item that you have access to.

I'm probably missing something obvious. I can't see it though.

ghost commented Jun 26, 2016

Here is what I did:

  1. open~/.bashrc
  2. add .local/bin
  3. open a terminal
  4. enter export PATH = "$HOME/.local/bin:$PATH"
  5. enter sudo curl -sf https://www.getlektor.com/install.sh | sh
  6. I get:
Welcome to Lektor

This script will install Lektor on your computer.

Error: None of the items in $PATH are writable. Run with sudo or add a $PATH item that you have access to.

I'm probably missing something obvious. I can't see it though.

@davidism

This comment has been minimized.

Show comment
Hide comment
@davidism

davidism Jun 26, 2016

Contributor

Put the full export line, not just the name of the directory, in .bashrc. Make sure the directory exists. Open a new terminal. Run the command.

Contributor

davidism commented Jun 26, 2016

Put the full export line, not just the name of the directory, in .bashrc. Make sure the directory exists. Open a new terminal. Run the command.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 27, 2016

Here is what I now did:

  1. open~/.bashrc
  2. add export PATH = "$HOME/.local/bin:$PATH"
  3. make sure ~/.local/bin exists (it does and contains pip, pip2 & pip2.7)
  4. open a terminal
  5. enter sudo curl -sf https://www.getlektor.com/install.sh | sh

What I get is the same error again.

ghost commented Jun 27, 2016

Here is what I now did:

  1. open~/.bashrc
  2. add export PATH = "$HOME/.local/bin:$PATH"
  3. make sure ~/.local/bin exists (it does and contains pip, pip2 & pip2.7)
  4. open a terminal
  5. enter sudo curl -sf https://www.getlektor.com/install.sh | sh

What I get is the same error again.

@davidism

This comment has been minimized.

Show comment
Hide comment
@davidism

davidism Jun 27, 2016

Contributor

My bad, typo. There shouldn't be any space around the = in the export command. Actually you should have seen an error with that. And don't use sudo in front of the curl command (it's not doing anything anyway, you would need it in front of the sh command (but don't do that either)) If that's not it then I can't reproduce your issue.

Contributor

davidism commented Jun 27, 2016

My bad, typo. There shouldn't be any space around the = in the export command. Actually you should have seen an error with that. And don't use sudo in front of the curl command (it's not doing anything anyway, you would need it in front of the sh command (but don't do that either)) If that's not it then I can't reproduce your issue.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 27, 2016

After your suggestions and running source ~/.bashrc to "refresh" the new setting I finally could install lektor!
Thank you!

Isn't there a way to make this a non-issue for ubuntu users in the future?

ghost commented Jun 27, 2016

After your suggestions and running source ~/.bashrc to "refresh" the new setting I finally could install lektor!
Thank you!

Isn't there a way to make this a non-issue for ubuntu users in the future?

@javierdaza

This comment has been minimized.

Show comment
Hide comment
@javierdaza

javierdaza Jun 27, 2016

what do you think about it @mitsuhiko ? Maybe now that @mray has an answer he can make a collaboration on this issue.

javierdaza commented Jun 27, 2016

what do you think about it @mitsuhiko ? Maybe now that @mray has an answer he can make a collaboration on this issue.

@mitsuhiko

This comment has been minimized.

Show comment
Hide comment
@mitsuhiko

mitsuhiko Jul 7, 2016

Member

The installer should be improved for sure! I will update the title.

Member

mitsuhiko commented Jul 7, 2016

The installer should be improved for sure! I will update the title.

@mitsuhiko mitsuhiko changed the title from Ubuntu installation needs stuff in $Path to curl based installer needs to be improved (Ubuntu installation needs stuff in $Path) Jul 7, 2016

@arbonap

This comment has been minimized.

Show comment
Hide comment
@arbonap

arbonap Aug 7, 2016

Hi @mitsuhiko -- we should merge Issues #250 and this one (#213), since they seem to be one and the same.

arbonap commented Aug 7, 2016

Hi @mitsuhiko -- we should merge Issues #250 and this one (#213), since they seem to be one and the same.

@dragon788

This comment has been minimized.

Show comment
Hide comment
@dragon788

dragon788 May 11, 2018

On newer versions of Ubuntu the default ~/.profile will add ~/.local/bin and ~/bin to the PATH, but only if they exist when the user is first logging into a graphical session. If you need these added and don't want to reboot/logout and in, you can source the file with . ~/.profile in the script which should solve the issue as long as those entries are defined in that file.

dragon788 commented May 11, 2018

On newer versions of Ubuntu the default ~/.profile will add ~/.local/bin and ~/bin to the PATH, but only if they exist when the user is first logging into a graphical session. If you need these added and don't want to reboot/logout and in, you can source the file with . ~/.profile in the script which should solve the issue as long as those entries are defined in that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment