Advice to update Mercurial in a shared hosting?
Marcos Cruz
mercurial-list at programandala.net
Thu Jul 14 14:28:30 UTC 2022
Manuel Jacob escribió/skribis/wrote/scrit (2022-07-12T07:30:02+0200):
> > - The server has Mercurial 3.7.3, Python 2.6.6 and 3.4.3.
> >
> > - My local system (Debian 10.12) has Mercurial 6.1.4, Python 2.7.16 and
> > 3.7.3.
> The basic protocol should be compatible even if the difference in
> versions is large.
So in theory Mercurial 3.7.3 on the server would work with my local
Mercurial 6.1.4 (now 6.2)?
I'm sure CGI works fine on my subdomain (I tested it with several Bash
scripts), I use the <hgwebdir.cgi> bundled with Mercurial 3.7.3. (the
only change I made was setting `config` to "." or the absolute path, I
tried both), and <hgwebdir.config> seems ok (containing just a test repo
`repo3 = repo3` in its `[paths]` section), but so far I always get error
500.
> > I've found some instructions to update Python on a shared hosting
>
> To be clear, which instructions are you referring to?
I meant just generic instructions found on the web, e.g.
<https://www.godaddy.com/garage/how-to-install-and-configure-python-on-a-hosted-server/>
and <https://geeksta.net/geeklog/python-shared-hosting/>.
> To build Mercurial without installing it, running `make local` should work
> on the right Python version, as described above.
I need to update Python first, installing it into my home directory on
the server, through SSH. I tried, but I have no permission to execute
gcc on the server:
```
$ cd ~/opt/Python-3.10.5/
$ ./configure --prefix=$HOME/.local
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.10... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/ME/opt/Python-3.10.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
$ whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc
/usr/share/man/man1/gcc.1.gz
$ gcc --version
-jailshell: /usr/bin/gcc: Permission denied
```
I remember I had a similar issue some time ago, installing a server for
my Fossil repositories. My only option was to compile Fossil on my local
machine, statically binded, and upload the executable to the server.
I have tried something similar with Python 3.10.5, just in case: I
compiled it and installed it into </tmp/.local/> on my machine, then
uploaded it in a tar.gz to the server and unpacked it into <~/.local>. I
have <~/.local/bin> already at the start of the server's `$PATH`. But:
```
$ python3 -V
python3: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.26' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by python3)
python3: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by python3)
```
> 1a) `pip install --user mercurial` should hopefully select the right
> Mercurial version that works on the Python version it’s running with.
I'm contacting my hosting provider, in case they can update Python and
even Mercurial. If not, I think my only choice is to upgrade my hosting
plan to a VPS.
A simpler publishing option, which I already had considered, is making
the plain repositories available and update their <.hg> directories via
FTP. I already have written a Mercurial's shell alias called "mirror"
for that. Anyone interested could clone and pull the repos and
contribute patches or bundles by email. It's not ideal, but enough for
most of my solo projects.
--
Marcos Cruz
http://programandala.net
More information about the Mercurial
mailing list