找回密码
 立即注册
首页 业界区 安全 安装odoo18依赖报错command 'x86_64-linux-gnu-gcc' fai ...

安装odoo18依赖报错command 'x86_64-linux-gnu-gcc' failed:

肇默步 7 天前
  1. Stored in directory: /home/odoo/.cache/pip/wheels/77/5b/07/8f6fd252b4274383642901cddf59c85d74322c6ee887b7f375 Building wheel for psycopg2 (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for psycopg2 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [43 lines of output] /tmp/pip-build-env-e0jv9cvs/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/__init__.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/errors.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-cpython-312/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-cpython-312/psycopg2 running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-cpython-312/psycopg x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC "-DPSYCOPG_VERSION=2.9.9 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=160009 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/home/odoo/odoo18/venv_odoo/include -I/usr/include/python3.12 -I. -I/usr/include/postgresql -I/usr/include/postgresql/16/server -I/usr/include/libxml2 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-cpython-312/psycopg/adapter_asis.o -Wdeclaration-after-statement It appears you are missing some prerequisite to build the package from source. You may install a binary package by installing 'psycopg2-binary' from PyPI. If you want to install psycopg2 from source, please install the packages required for the build and try again. For further information please check the 'doc/src/install.rst' file (also at ). error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psycopg2 Building wheel for python-ldap (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for python-ldap (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [91 lines of output] /tmp/pip-build-env-16j2mj9q/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) /tmp/pip-build-env-16j2mj9q/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: Python Software Foundation License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-312 copying Lib/ldapurl.py -> build/lib.linux-x86_64-cpython-312 copying Lib/ldif.py -> build/lib.linux-x86_64-cpython-312 creating build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/async.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/compat.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/constants.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/dn.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/filter.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/functions.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/logger.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-cpython-312/ldap copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-cpython-312/ldap creating build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-cpython-312/ldap/controls copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-cpython-312/ldap/controls creating build/lib.linux-x86_64-cpython-312/ldap/extop copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-cpython-312/ldap/extop copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-cpython-312/ldap/extop copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-cpython-312/ldap/extop creating build/lib.linux-x86_64-cpython-312/ldap/schema copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-cpython-312/ldap/schema copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-cpython-312/ldap/schema copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-cpython-312/ldap/schema copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-cpython-312/ldap/schema creating build/lib.linux-x86_64-cpython-312/slapdtest copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-cpython-312/slapdtest copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-cpython-312/slapdtest running egg_info writing Lib/python_ldap.egg-info/PKG-INFO writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt writing requirements to Lib/python_ldap.egg-info/requires.txt writing top-level names to Lib/python_ldap.egg-info/top_level.txt reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'Doc/.build' adding license file 'LICENCE' writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt' creating build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-cpython-312/slapdtest/certs copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-cpython-312/slapdtest/certs running build_ext building '_ldap' extension creating build/temp.linux-x86_64-cpython-312/Modules x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=3.4.4 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -I/home/odoo/odoo18/venv_odoo/include -I/usr/include/python3.12 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-312/Modules/LDAPObject.o error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for python-ldap Building wheel for rjsmin (pyproject.toml) ... done Created wheel for rjsmin: filename=rjsmin-1.2.0-py3-none-any.whl size=12500 sha256=5a2ce6dec8c9566b49178f24fc6939b0afb987cff183fe130c50507ab354714f Stored in directory: /home/odoo/.cache/pip/wheels/ab/d6/d4/4e529d53a28c9281dd23ea0dba2c92cec871896491e6ce3651 Building wheel for vobject (pyproject.toml) ... done Created wheel for vobject: filename=vobject-0.9.6.1-py3-none-any.whl size=47546 sha256=b3805dd98133ba49403c140a1fb3933321a80fa15851fd093c8757d1c1dd0288 Stored in directory: /home/odoo/.cache/pip/wheels/87/1b/3d/2479a6983ef4a9bc5f68b0c663e2e16a07b506f508ff1e3c81 Building wheel for docopt (pyproject.toml) ... done Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13783 sha256=d3f5dba995a4e50ac03d4051169ef149606b6e9963e5e4c9f40339a5b3602062 Stored in directory: /home/odoo/.cache/pip/wheels/2a/b8/31/1189f1b62b270fe951056e25a0bf7aca2c5241dac0c5d3db68 Successfully built ofxparse rjsmin vobject docopt Failed to build psycopg2 python-ldap error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─> psycopg2, python-ldap
复制代码
这个错误表明在尝试构建psycopg2和python-ldap这两个Python包的过程中遇到了问题。错误信息中提到了找不到x86_64-linux-gnu-gcc编译器,这通常是因为缺少必要的构建工具和库。
要解决这个问题,您可以按照以下步骤操作:

  • 安装构建工具
  • 首先,确保您的系统上安装了GCC和其他必要的构建工具。在Ubuntu上,您可以使用以下命令安装:
    1. sudo apt-get update sudo apt-get install build-essential -y
    复制代码
  • 安装PostgreSQL开发库
  • psycopg2是Python的PostgreSQL数据库适配器,它需要PostgreSQL的开发库来进行编译。使用以下命令安装:
    1. sudo apt-get install libpq-dev
    复制代码
  • 安装OpenLDAP开发库
  • python-ldap`是Python的LDAP库,它需要OpenLDAP的开发库来进行编译。使用以下命令安装:
    1. sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
    复制代码
  • 重新安装包
  • 在安装了必要的依赖项之后,尝试再次安装这两个包。您可以使用以下命令:
    1. pip install psycopg2 pip install python-ldap
    复制代码

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册