1

Am trying to deploy a Flask app with CGI on Strato. It has Python but only Python 2.7. If I type python at the terminal prompt it looks like this:

> python
Python 2.7.12 (default, Sep 14 2016, 16:45:14) 
[GCC 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>>

The program I have developed locally has been done with python 3.6 so I think that before other steps to do with getting the .cgi file right, everything in the right folders etc needs to be to get Python 3 on this system.

I have tried two things to accomplish this but have not yet succeeded. The first was to bring a compressed archive from python.org with wgetand try to install it, the second was miniconda. Well, the second was over almost before it began:

> wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
Saving to: 'Miniconda3-latest-Linux-x86_64.sh'

Miniconda3-latest-Linux-x86_64.sh    100%[====================================================================>]  56.14M  69.5MB/s    in 0.8s    

> ./Miniconda3-latest-Linux-x86_64.sh 
./Miniconda3-latest-Linux-x86_64.sh: Permission denied.

The first one though potentially carries more hope:

> wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
> tar -xvzf Python-3.6.5.tar.xz
> cd Python-3.6.5
> ./configure --prefix=$HOME/.local
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking for python3.6... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... sunos5
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/mnt/customerID/htdocs/python3/Python-3.6.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

So given the system Python seems to have its own GCC, why can't this install find one, and how can I get a path to the one the system Python is using and give it to this install command?

Have looked at various links but not really found a solution - if it is possible at all, the solution is possibly to build python 3 locally locally then upload that, but that sounds a harder option. The links are: 1, 2, 3 There is no yum or apt-get which one of these solutions asks for.

OS is:

> uname -a
SunOS vilis 5.11 11.3 i86pc i386 i86pc Solaris
davidism
  • 121,510
  • 29
  • 395
  • 339
cardamom
  • 6,873
  • 11
  • 48
  • 102
  • Can't you install c compiler on this machine? – metmirr Jun 04 '18 at 09:03
  • @metmirr thanks for the reply, am trying to do just that. Looking now at [a question about installing that without root privileges](https://stackoverflow.com/questions/3212099/install-gcc-on-linux-with-no-root-privilege). Downloaded gcc-8.1.0 yesterday, but following [these instructions](https://solarianprogrammer.com/2017/05/04/building-gcc-wsl-windows-subsystem-linux/) am stuck at `contrib/download_prerequisites` which returns `syntax error at line 47: OS=$' unexpected` – cardamom Jun 04 '18 at 09:15
  • 1. Check whether gcc is in your system's PATH env variable and add if needed or set it for a single `configure` command. 2. Of course there is no yum or apt-get, solaris 11 uses [pkg as a package manager](https://stackoverflow.com/questions/4664472/installing-gcc-on-oracle-solaris-11). – Fine Jun 04 '18 at 13:11
  • Thanks @Fian Typing `gcc` at the prompt gives `gcc: Command not found.` is that enough proof? For now, I am trying to achieve the same outcome using the Python 2 which the system already has, Flask runs under that too. Given there is no root access and also no `make`command for example, not sure it is possible to get Python 3 on there with the limited commands and rights. Also tried EasyBuild as discussed [here](https://stackoverflow.com/a/13501191/4288043) but that ultimately also hit a wall. – cardamom Jun 04 '18 at 13:19
  • @cardamom *and also no `make` command* `make` on Solaris is located in `/usr/ccs/bin`. – Andrew Henle Jun 04 '18 at 14:34
  • Thanks @AndrewHenle well whoever set this thing up has probably removed anything useful - no `ccs/` in `/usr/` I just ran `find /usr/ -name 'make*'` and couldn't find a `make` just a bunch of `make.vim` in different places, `/usr/bin/makeinfo` and a few other things which probably aren't useful. – cardamom Jun 04 '18 at 15:22
  • @cardamom I'll have to go check, but I'm pretty sure there's no way to install Solaris without getting a `/usr/ccs/bin` directory. I seem to remember that some of the things in there are *required* parts of the OS. If you're paying for Oracle support on that machine, go congratulate the misguided "genius" who decided to violate your support contract by deleting `/usr/ccs/`. For some reason, there are a lot of utterly **WRONG** "security guides" that advocate doing things to Solaris like that - and they almost all both violate any service contract and break the OS. – Andrew Henle Jun 04 '18 at 16:18
  • Assuming that you have root access, you should be able to `pkg install developer/build/make gcc` and get both sunpro make and gcc installed in the correct place. Given that you say there's no `/usr/ccs`, you should run `pkg verify` (dump output to a file) and check what else is missing or otherwise different to what the packaging system expects. – James McPherson Jun 27 '18 at 22:39

0 Answers0