当尝试在Solaris10x86盒上将python 3.6.5安装到本地路径/ scratch / satish / 365时,我遇到了问题。我也已经在本地路径/ scratch / satish / openssl32和/ scratch / satish / openssl上安装了32和64位的openssl1.1.1a。由于python试图使用32位库。因此,用
更新了python setup.py文件。# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
'/scratch/satish/openssl32/include'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
)
if ssl_incs is not None:
krb5_h = find_file('krb5.h', inc_dirs,
['/usr/kerberos/include'])
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
['/scratch/satish/openssl32/lib'
] )
进行所有这些更改后,用于配置的命令为:
./ configure --prefix = / scratch / satish / 365 /
运行正常。当我尝试使用命令'make'做make时,出现以下消息:
*** WARNING: renaming "_struct" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_ctypes_test" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "array" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "cmath" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "math" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_datetime" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_random" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_bisect" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_heapq" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_pickle" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_json" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_testcapi" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_testbuffer" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_testimportmultiple" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_testmultiphase" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_lsprof" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "unicodedata" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_opcode" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_asyncio" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "fcntl" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "grp" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "spwd" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "select" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "parser" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "mmap" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "syslog" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "audioop" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_crypt" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_csv" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_posixsubprocess" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_socket" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_ssl" since importing it failed: ld.so.1: python: fatal: libssl.so.1.1: open failed: No such file or directory
*** WARNING: renaming "_hashlib" since importing it failed: ld.so.1: python: fatal: libssl.so.1.1: open failed: No such file or directory
*** WARNING: renaming "_sha256" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_sha512" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_md5" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_sha1" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_blake2" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_sha3" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_sqlite3" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_dbm" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "termios" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "resource" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "nis" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_curses_panel" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "zlib" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "binascii" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_bz2" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "pyexpat" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_elementtree" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_multibytecodec" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_kr" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_jp" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_cn" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_tw" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_hk" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_codecs_iso2022" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_decimal" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_multiprocessing" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "xxlimited" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_ctypes" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm _lzma _tkinter
ossaudiodev readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit pwd time
Following modules built successfully but were removed because they could not be imported:
_asyncio _bisect _blake2
_bz2 _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _crypt _csv
_ctypes _ctypes_test _curses
_curses_panel _datetime _dbm
_decimal _elementtree _hashlib
_heapq _json _lsprof
_md5 _multibytecodec _multiprocessing
_opcode _pickle _posixsubprocess
_random _sha1 _sha256
_sha3 _sha512 _socket
_sqlite3 _ssl _struct
_testbuffer _testcapi _testimportmultiple
_testmultiphase array audioop
binascii cmath fcntl
grp math mmap
nis parser pyexpat
resource select spwd
syslog termios unicodedata
xxlimited zlib
running build_scripts
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -o Programs/_testembed.o ./Programs/_testembed.c
gcc -o Programs/_testembed Programs/_testembed.o libpython3.6m.a -lsocket -lnsl -lintl -lrt -ldl -lsendfile -lm
# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
sed -e "s,@EXENAME@,/scratch/satish/365/bin/python3.6m," < ./Misc/python-config.in >python-config.py
# Replace makefile compat. variable references with shell script compat. ones; ->
LC_ALL=C sed -e 's,\$(\([A-Za-z0-9_]*\)),\$\{\1\},g' < Misc/python-config.sh >python-config
# On Darwin, always use the python version of the script, the shell
# version doesn't use the compiler customizations that are provided
# in python (_osx_support.py).
if test `uname -s` = Darwin; then \
cp python-config.py python-config; \
fi
进行'make test'会给出与_socket相关的错误消息。
*** WARNING: renaming "_decimal" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_multiprocessing" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "xxlimited" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
*** WARNING: renaming "_ctypes" since importing it failed: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm _lzma _tkinter
ossaudiodev readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit pwd time
Following modules built successfully but were removed because they could not be imported:
_asyncio _bisect _blake2
_bz2 _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _crypt _csv
_ctypes _ctypes_test _curses
_curses_panel _datetime _dbm
_decimal _elementtree _hashlib
_heapq _json _lsprof
_md5 _multibytecodec _multiprocessing
_opcode _pickle _posixsubprocess
_random _sha1 _sha256
_sha3 _sha512 _socket
_sqlite3 _ssl _struct
_testbuffer _testcapi _testimportmultiple
_testmultiphase array audioop
binascii cmath fcntl
grp math mmap
nis parser pyexpat
resource select spwd
syslog termios unicodedata
xxlimited zlib
running build_scripts
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /scratch/satish/Python-3.6.5/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
./python -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
./python ./Tools/scripts/run_tests.py
Traceback (most recent call last):
File "./Tools/scripts/run_tests.py", line 12, in <module>
import test.support
File "/scratch/satish/Python-3.6.5/Lib/test/support/__init__.py", line 15, in <module>
import logging.handlers
File "/scratch/satish/Python-3.6.5/Lib/logging/handlers.py", line 26, in <module>
import logging, socket, os, pickle, struct, time, re
File "/scratch/satish/Python-3.6.5/Lib/socket.py", line 49, in <module>
import _socket
ModuleNotFoundError: No module named '_socket'
make: *** [test] Error 1
bash-3.2#
我正在使用gcc版本4.8.2(GCC)。有人可以建议我在这里错过什么吗?