Search code examples
macosinstallationlektor

Lektor command-line installation fails on OS X 10.11.6


I've just installed Lektor desktop app for OS X on two computers, and when I select "Install Shell Command", it prompts for admin credentials (my default user account is not admin in either case) and after I've entered the admin details it then responds with:

Error
Failed to install shell commands

A search for 'lektor' in the console revealed no log entries.

Both machines have XCode 8.0 installed (don't know if this makes a difference).

(FYI, but not part of this question, subsequent attempts to install the Command Line App via the bash script succeeded on one and failed on the other computer.)


Solution

  • didn't work for me either. So I looked at the shell script for command line installation and saw that it is basically only a wrapper around a python script.

    Solution:

    I copy/pasted the python code from the shell script into a file and then ran it on the command line. Installation worked fine then.

    Steps I've taken:

    1. Environment: macOS 10.12.1 with python 2.7.12_2 installed via homebrew, fish shell (just a bash replacement)
    2. used the "curl ..." link from getlektor.com to download the script - you need to modify it to get the file without immediately installing: curl -sf https://www.getlektor.com/install.sh > getlektor.txt
    3. open getlektor.txt in an editor and copy the python code into a new which named "install_lektor.py". The python code starts with the line "import os" and ends with the line "main()"
    4. run the new python script with "python install_lektor.py"

    Hope this helps!