Error in letsencrypt-auto installation script


#1

Hi all,
I’m just trying to contact developers about an error in letsencrypt-auto script I found in my environment and looks like this is the best place to report.
I’m trying to install the letsencrypt client using letsencrypt-auto version 0.4.0 onto Linux CentOS 5.11 (2.6.18-406.el5PAE)

While checking the Python version, the script exit with the error below:
./letsencrypt-auto: line 108: [: too many arguments

The error for me is on the line 107:
PYVER="$LE_PYTHON" --version 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'
My Python 2.4.3 doesn’t support ‘–version’ key, so $PYVER doesn’t forms correctly and contains few strings of Python options usage text.
My Python 2.4.3 have only ‘-V’ key to show its version. As soon as I put it instead of ‘–version’ it works as intended. So, my working string 107 is:
PYVER="$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'
(back quotes lost, since they’re using for formatting here)

Just my findings…


#2

I think all the errors are because you are on an old operating system (CentOS 5.11) and python 2.4.3

personally I’d upgrade, or use one of the alternate clients


#3

Not sure how the CentOS version is related here directly.
I know, my Python version is old, but that is exactly the purpose of that version check code of the script - to tell me that my Python is old. It shouldn’t break execution with an error. Existence of that code proves that Developers had foreseen possibility that somebody would try to install the client using older Python version and that check was intended to either tell me that or even update Python automatically.
Now, after digging into the code and fixing it for my environment, I know that minimum Python version required is 2.6.x, but how about others?
Most likely, I will upgrade Python after confirming that it wouldn’t affect other production systems running on same server.


#4

Purely experience and reading the forums here. I have no idea about the latest version of LE, but earlier versions of the code didn’t work on CentOS 5.11 because not only will your Python be old, but the version of bash will be old. So yes, you are correct in that is checking about the version of Python installed, but I’m not sure if it checks the version of bash ( I haven’t checked the code )