Wie installiert man Python2.6 in alpine Docker Container.Wie installiere ich python2.6 im alpinen Container?
Ich habe versucht, von der Quelle zu installieren, es gibt mir Kompilierungsfehler.
Eigentlich möchte ich Python2.6 und Python2.7 in Container installieren. Damit ich Unittests sowohl auf Python 2.6 als auch auf Python 2.7 ausführen kann. Bitte geben Sie einige Gedanken dazu.
Ich habe gcc, g ++, in alpine Container installiert dann die folgenden Schritte.
wget https://www.python.org/ftp/python/2.6/Python-2.6.tgz
tar xvzf Python-2.6.tgz
cd Python-2.6
./configure
make
habe diesen Fehler während machen,
~/Python-2.6 # make
gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -DPYTHONPATH='":plat-linux4:lib-tk:lib-old"' \
-DPREFIX='"/usr/local"' \
-DEXEC_PREFIX='"/usr/local"' \
-DVERSION='"2.6"' \
-DVPATH='""' \
-o Modules/getpath.o ./Modules/getpath.c
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
./Modules/posixmodule.c:6173:1: error: conflicting types for 'posix_close'
posix_close(PyObject *self, PyObject *args)
^
In file included from Include/Python.h:44:0,
from ./Modules/posixmodule.c:30:
/usr/include/unistd.h:38:5: note: previous declaration of 'posix_close' was here
int posix_close(int, int);
^
Makefile:1234: recipe for target 'Modules/posixmodule.o' failed
make: *** [Modules/posixmodule.o] Error 1
Kann vorschlagen jemand, wie kann ich dieses Problem lösen?
nicht sicher, dass es wird helfen, aber vielleicht wäre es einen Moment wert, einen Blick darauf zu werfen, wie Alpine 2.6 gebaut hat: http://git.alpinelinux.org/cgit/aports/tree/main/python?id=96e95a93287adc9c6bdf8689fa974b11d41dc492 und wie sie 2.7 bauen : http://git.alpinelinux.org/cgit/aports/ Baum/Haupt/python2. – wrwrwr