GBase8c psycopg2安装(centos6)

news2024/11/14 20:28:33

GBase8c psycopg2安装(centos6)

安装步骤:

[root@centos6 ~]# cd /opt/python/
[root@centos6 python]# ls
psycopg2-2.7.7.tar.gz
[root@centos6 python]# tar -zxf psycopg2-2.7.7.tar.gz
[root@centos6 python]# cd psycopg2-2.7.7
# 安装命令
[root@centos6 psycopg2-2.7.7]# python setup.py install
# 检测安装是否成功
[root@centos6 psycopg2-2.7.7]# python
>>> import psycopg2

在这里插入图片描述
在这里插入图片描述

报错1:Error: pg_config executable not found.
[root@centos6 psycopg2-2.7.7]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-2.6/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-2.6/psycopg2
creating build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-2.6/psycopg2/tests
running build_ext

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).

在这里插入图片描述

解决方法:

[root@centos6 psycopg2-2.7.7]# yum install postgresql postgresql-devel postgresql-libs

在这里插入图片描述

报错2:unable to execute gcc: No such file or directory
[root@centos6 psycopg2-2.7.7]# python setup.py install
running install
running build
running build_py
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/psycopg
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.7 (dt dec pq3 ext) -DPG_VERSION_NUM=80420 -I/usr/include/python2.6 -I. -I/usr/include -I/usr/include/pgsql/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
unable to execute gcc: No such file or directory

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
<http://initd.org/psycopg/docs/install.html>).

error: command 'gcc' failed with exit status 1

解决方法:

[root@centos6 psycopg2-2.7.7]# yum install gcc

在这里插入图片描述

报错3:error “Psycopg requires PostgreSQL client library (libpq) >= 9.1”
# pg_config 安装的版本需要大于9.1
[root@centos6 psycopg2-2.7.7]# python setup.py install
running install
running build
running build_py
running build_ext
building 'psycopg2._psycopg' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.7 (dt dec pq3 ext) -DPG_VERSION_NUM=80420 -I/usr/include/python2.6 -I. -I/usr/include -I/usr/include/pgsql/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
在包含自 psycopg/psycopgmodule.c:27 的文件中:
./psycopg/psycopg.h:30:2: 错误:#error "Psycopg requires PostgreSQL client library (libpq) >= 9.1"
./psycopg/psycopg.h:34:20: 错误:Python.h:没有那个文件或目录
在包含自 ./psycopg/psycopg.h:38 的文件中,
                 从 psycopg/psycopgmodule.c:27:
./psycopg/python.h:29:26: 错误:structmember.h:没有那个文件或目录
./psycopg/python.h:31:26: 错误:stringobject.h:没有那个文件或目录
./psycopg/python.h:35:4: 错误:#error "psycopg requires Python >= 2.6"
In file included from ./psycopg/psycopg.h:38,
                 from psycopg/psycopgmodule.c:27:
./psycopg/python.h:138: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:27:
./psycopg/psycopg.h:63: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:64: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:67: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:108: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:111: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:119: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:127: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:130: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:130: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:132: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:133: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:134: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:135: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:138: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:140: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:142: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:145: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ./psycopg/connection.h:29,
                 from psycopg/psycopgmodule.c:29:
./psycopg/xid.h:30: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xidType’
./psycopg/xid.h:33: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/xid.h:46: 错误:expected ‘)’ before ‘*’ token
./psycopg/xid.h:47: 错误:expected ‘)’ before ‘*’ token
./psycopg/xid.h:48: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/xid.h:49: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:29:
./psycopg/connection.h:76: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘connectionType’
./psycopg/connection.h:85: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/connection.h:152: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:153: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:154: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:156: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:175: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:30:
./psycopg/cursor.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cursorType’
./psycopg/cursor.h:39: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/cursor.h:94: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/cursor.h:96: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
./psycopg/cursor.h:97: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
./psycopg/cursor.h:98: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:31:
./psycopg/replication_connection.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationConnectionType’
./psycopg/replication_connection.h:48: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/replication_connection.h:49: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ./psycopg/replication_cursor.h:30,
                 from psycopg/psycopgmodule.c:32:
./psycopg/libpq_support.h:31: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XLogRecPtr’
./psycopg/libpq_support.h:44: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘feGetCurrentTimestamp’
./psycopg/libpq_support.h:45: 错误:expected ‘)’ before ‘i’
./psycopg/libpq_support.h:46: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fe_recvint64’
In file included from psycopg/psycopgmodule.c:32:
./psycopg/replication_cursor.h:36: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationCursorType’
./psycopg/replication_cursor.h:44: 错误:字段‘last_io’的类型不完全
./psycopg/replication_cursor.h:45: 错误:字段‘keepalive_interval’的类型不完全
./psycopg/replication_cursor.h:47: 错误:expected specifier-qualifier-list before ‘XLogRecPtr’
In file included from psycopg/psycopgmodule.c:33:
./psycopg/replication_message.h:36: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationMessageType’
./psycopg/replication_message.h:40: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:34:
./psycopg/green.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/green.h:59: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:35:
./psycopg/lobject.h:37: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobjectType’
./psycopg/lobject.h:40: 错误:expected specifier-qualifier-list before ‘PyObject’
./psycopg/lobject.h:60: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_read’
./psycopg/lobject.h:61: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_write’
./psycopg/lobject.h:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_seek’
./psycopg/lobject.h:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_tell’
In file included from psycopg/psycopgmodule.c:36:
./psycopg/notify.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘notifyType’
./psycopg/notify.h:32: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:38:
./psycopg/typecast.h:34: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:39: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typecastType’
./psycopg/typecast.h:42: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/typecast.h:57: 错误:expected specifier-qualifier-list before ‘typecast_function’
./psycopg/typecast.h:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:65: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:69: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:74: 错误:expected ‘)’ before ‘*’ token
./psycopg/typecast.h:75: 错误:expected ‘)’ before ‘*’ token
./psycopg/typecast.h:78: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:81: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:83: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:87: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:39:
./psycopg/microprotocols.h:38: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:49: 错误:expected ‘)’ before ‘*’ token
./psycopg/microprotocols.h:51: 错误:expected ‘)’ before ‘*’ token
./psycopg/microprotocols.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:55: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:58: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:40:
./psycopg/microprotocols_proto.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘isqlquoteType’
./psycopg/microprotocols_proto.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:41:
./psycopg/error.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘errorType’
./psycopg/error.h:32: 错误:expected specifier-qualifier-list before ‘PyBaseExceptionObject’
./psycopg/error.h:41: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:42:
./psycopg/diagnostics.h:31: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘diagnosticsType’
./psycopg/diagnostics.h:34: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:44:
./psycopg/adapter_qstring.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘qstringType’
./psycopg/adapter_qstring.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:45:
./psycopg/adapter_binary.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘binaryType’
./psycopg/adapter_binary.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:46:
./psycopg/adapter_pboolean.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pbooleanType’
./psycopg/adapter_pboolean.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:47:
./psycopg/adapter_pint.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pintType’
./psycopg/adapter_pint.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:48:
./psycopg/adapter_pfloat.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pfloatType’
./psycopg/adapter_pfloat.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:49:
./psycopg/adapter_pdecimal.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pdecimalType’
./psycopg/adapter_pdecimal.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:50:
./psycopg/adapter_asis.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asisType’
./psycopg/adapter_asis.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:51:
./psycopg/adapter_list.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘listType’
./psycopg/adapter_list.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:52:
./psycopg/typecast_binary.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘chunkType’
./psycopg/typecast_binary.h:38: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
psycopg/psycopgmodule.c:60:22: 错误:datetime.h:没有那个文件或目录
In file included from psycopg/psycopgmodule.c:61:
./psycopg/adapter_datetime.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pydatetimeType’
./psycopg/adapter_datetime.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/adapter_datetime.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:58: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:75: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:82: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:91: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:95: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:99: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:103: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:62: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:73: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:83: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:127: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:169: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:236: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c: 在函数‘psyco_libcrypto_threads_init’中:
psycopg/psycopgmodule.c:277: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:277: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
psycopg/psycopgmodule.c:277: 错误:所在的函数内也只报告一次。)
psycopg/psycopgmodule.c:277: 错误:‘m’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:280: 警告:隐式声明函数‘PyImport_ImportModule’
psycopg/psycopgmodule.c:284: 警告:隐式声明函数‘Py_DECREF’
psycopg/psycopgmodule.c:289: 警告:隐式声明函数‘PyErr_Clear’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:298: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:399: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:496: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:520: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:523: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:528: 错误:expected specifier-qualifier-list before ‘PyObject’
psycopg/psycopgmodule.c:532: 错误:‘Error’未声明(不在函数内)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:533: 错误:‘Warning’未声明(不在函数内)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:534: 错误:‘InterfaceError’未声明(不在函数内)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:535: 错误:‘DatabaseError’未声明(不在函数内)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:536: 错误:‘InternalError’未声明(不在函数内)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:537: 错误:‘OperationalError’未声明(不在函数内)
psycopg/psycopgmodule.c:537: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:537: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:537: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:537: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:538: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:538: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:539: 错误:‘ProgrammingError’未声明(不在函数内)
psycopg/psycopgmodule.c:539: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:539: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:539: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:539: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:540: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:540: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:541: 错误:‘IntegrityError’未声明(不在函数内)
psycopg/psycopgmodule.c:541: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:541: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:541: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:541: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:542: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:542: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:543: 错误:‘DataError’未声明(不在函数内)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:544: 错误:‘NotSupportedError’未声明(不在函数内)
psycopg/psycopgmodule.c:544: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:544: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:544: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:544: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:545: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:545: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:546: 错误:‘QueryCanceledError’未声明(不在函数内)
psycopg/psycopgmodule.c:546: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:546: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:547: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:547: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:547: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:547: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:549: 错误:‘TransactionRollbackError’未声明(不在函数内)
psycopg/psycopgmodule.c:549: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:549: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c:549: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:549: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c:550: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:550: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c: 在函数‘psyco_errors_init’中:
psycopg/psycopgmodule.c:563: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:563: 错误:‘dict’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:564: 错误:‘str’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:565: 警告:ISO C90 不允许混合使用声明和代码
psycopg/psycopgmodule.c:568: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:571: 警告:隐式声明函数‘PyDict_New’
psycopg/psycopgmodule.c:573: 错误:‘struct <anonymous>’没有名为‘docstr’的成员
psycopg/psycopgmodule.c:574: 警告:隐式声明函数‘PyString_FromString’
psycopg/psycopgmodule.c:574: 错误:‘struct <anonymous>’没有名为‘docstr’的成员
psycopg/psycopgmodule.c:575: 警告:隐式声明函数‘PyDict_SetItemString’
psycopg/psycopgmodule.c:576: 警告:隐式声明函数‘Py_CLEAR’
psycopg/psycopgmodule.c:581: 错误:‘struct <anonymous>’没有名为‘exc’的成员
psycopg/psycopgmodule.c:581: 警告:隐式声明函数‘PyErr_NewException’
psycopg/psycopgmodule.c:583: 错误:‘struct <anonymous>’没有名为‘base’的成员
psycopg/psycopgmodule.c:583: 错误:‘struct <anonymous>’没有名为‘base’的成员
psycopg/psycopgmodule.c:583: 错误:‘PyExc_StandardError’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:593: 警告:隐式声明函数‘Py_XDECREF’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:599: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:616: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:637: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c: 在函数‘psyco_is_main_interp’中:
psycopg/psycopgmodule.c:680: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:680: 错误:‘main_interp’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:681: 错误:‘PyInterpreterState’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:681: 错误:‘interp’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:684: 警告:隐式声明函数‘PyThreadState_Get’
psycopg/psycopgmodule.c:684: 错误:‘->(有‘int’)的实参类型无效
psycopg/psycopgmodule.c:688: 警告:隐式声明函数‘PyInterpreterState_Head’
psycopg/psycopgmodule.c:693: 警告:隐式声明函数‘assert’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:708: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:748: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:802: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘psycopgMethods’
psycopg/psycopgmodule.c: 在函数‘init_psycopg’中:
psycopg/psycopgmodule.c:882: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:882: 错误:‘c_api_object’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 错误:‘module’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 错误:‘dict’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 警告:逗号表达式的左操作数不起作用
psycopg/psycopgmodule.c:895: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:895: 错误:‘connectionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:895: 错误:‘PyType_Type’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:896: 警告:隐式声明函数‘PyType_Ready’
psycopg/psycopgmodule.c:898: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:898: 错误:‘cursorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:901: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:901: 错误:‘replicationConnectionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:904: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:904: 错误:‘replicationCursorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:907: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:907: 错误:‘replicationMessageType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:910: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:910: 错误:‘typecastType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:913: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:913: 错误:‘qstringType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:916: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:916: 错误:‘binaryType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:919: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:919: 错误:‘isqlquoteType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:922: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:922: 错误:‘pbooleanType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:925: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:925: 错误:‘pintType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:928: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:928: 错误:‘pfloatType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:931: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:931: 错误:‘pdecimalType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:934: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:934: 错误:‘asisType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:937: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:937: 错误:‘listType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:940: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:940: 错误:‘chunkType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:943: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:943: 错误:‘notifyType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:946: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:946: 错误:‘xidType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:949: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:949: 错误:‘errorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:950: 错误:‘PyTypeObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:950: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:953: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:953: 错误:‘diagnosticsType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:956: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:956: 错误:‘lobjectType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:980: 错误:‘pyDateTimeModuleP’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:983: 警告:隐式声明函数‘PyErr_SetString’
psycopg/psycopgmodule.c:983: 错误:‘PyExc_ImportError’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:988: 错误:‘PyDateTime_IMPORT’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:993: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:993: 错误:‘pydatetimeType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:998: 警告:隐式声明函数‘Py_InitModule’
psycopg/psycopgmodule.c:998: 错误:‘psycopgMethods’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1004: 警告:隐式声明函数‘PyModule_GetDict’
psycopg/psycopgmodule.c:1012: 警告:隐式声明函数‘PyCObject_FromVoidPtr’
psycopg/psycopgmodule.c:1014: 警告:隐式声明函数‘PyModule_AddObject’
psycopg/psycopgmodule.c:1018: 错误:‘psycoEncodings’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1019: 警告:隐式声明函数‘psyco_encodings_fill’
psycopg/psycopgmodule.c:1020: 错误:‘psyco_null’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1021: 错误:‘psyco_DescriptionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1021: 警告:隐式声明函数‘psyco_make_description_type’
psycopg/psycopgmodule.c:1024: 警告:隐式声明函数‘PyModule_AddStringConstant’
psycopg/psycopgmodule.c:1026: 警告:隐式声明函数‘PyModule_AddIntConstant’
psycopg/psycopgmodule.c:1027: 警告:隐式声明函数‘PyModule_AddIntMacro’
psycopg/psycopgmodule.c:1030: 警告:隐式声明函数‘PyInt_FromLong’
psycopg/psycopgmodule.c:1034: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1035: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1036: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1037: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1038: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1039: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1040: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1041: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1042: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1043: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1044: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1045: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1046: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1047: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1048: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1049: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1050: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1051: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1068: 警告:隐式声明函数‘typecast_init’
psycopg/psycopgmodule.c:1071: 警告:隐式声明函数‘microprotocols_init’
psycopg/psycopgmodule.c:1072: 警告:隐式声明函数‘psyco_adapters_init’
psycopg/psycopgmodule.c:1076: 警告:隐式声明函数‘psyco_errors_fill’
psycopg/psycopgmodule.c:1078: 错误:‘replicationPhysicalConst’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1078: 警告:隐式声明函数‘PyDict_GetItemString’
psycopg/psycopgmodule.c:1079: 错误:‘replicationLogicalConst’未声明(在此函数内第一次使用)

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
<http://initd.org/psycopg/docs/install.html>).

error: command 'gcc' failed with exit status 1

解决方法:

# 可以把旧版本的postgresql依赖卸载
[root@centos6 psycopg2-2.7.7]# yum remove postgresql postgresql-devel postgresql-libs

在这里插入图片描述

# 安装依赖
[root@centos6 psycopg2-2.7.7]# yum install db4-cxx db4-devel gdbm-devel libicu libicu-devel perl perl-ExtUtils-MakeMaker perl-ExtUtils-ParseXS perl-IO-Tty perl-IPC-Run perl-Module-Pluggable perl-Pod-Escapes perl-Pod-Simple perl-Test-Harness perl-Test-Simple perl-Time-HiRes perl-devel perl-libs perl-version

在这里插入图片描述

# 安装postgresql12,目前postgres官网仅支持postgresql12版本
[root@centos6 psycopg2-2.7.7]# yum install postgresql12 postgresql12-libs postgresql12-devel
# 附yum源配置信息,如不能联网安装,可进入https://download.postgresql.org/pub/repos/yum选择具体版本下载安装
[root@centos6 psycopg2-2.7.7]# cat /etc/yum.repos.d/pg12.repo
[pg12]
name=PostgreSQL 12 for RHEL/CentOS $releasever - $basearch
baseurl=http://download.postgresql.org/pub/repos/yum/12/redhat/rhel-$releasever-$basearch
gpgcheck=0
enabled=1

在这里插入图片描述

报错4:安装完postgresql12后,报错Error: pg_config executable not found.
# Error: pg_config executable not found.
[root@centos6 psycopg2-2.7.7]# python setup.py install
running install
running build
running build_py
running build_ext

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).

解决方法:

[root@centos6 psycopg2-2.7.7]# find / -name "pg_config"
/usr/pgsql-12/bin/pg_config
[root@centos6 psycopg2-2.7.7]# ln -s /usr/pgsql-12/bin/pg_config /usr/bin/
[root@centos6 psycopg2-2.7.7]# pg_config --version
PostgreSQL 12.18

在这里插入图片描述

报错5:error “psycopg requires Python >= 2.6”
# error "psycopg requires Python >= 2.6"
[root@centos6 psycopg2-2.7.7]# python setup.py install
running install
running build
running build_py
running build_ext
building 'psycopg2._psycopg' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.7 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=120018 -DHAVE_LO64=1 -I/usr/include/python2.6 -I. -I/usr/pgsql-12/include -I/usr/pgsql-12/include/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement
在包含自 psycopg/psycopgmodule.c:27 的文件中:
./psycopg/psycopg.h:34:20: 错误:Python.h:没有那个文件或目录
在包含自 ./psycopg/psycopg.h:38 的文件中,
                 从 psycopg/psycopgmodule.c:27:
./psycopg/python.h:29:26: 错误:structmember.h:没有那个文件或目录
./psycopg/python.h:31:26: 错误:stringobject.h:没有那个文件或目录
./psycopg/python.h:35:4: 错误:#error "psycopg requires Python >= 2.6"
In file included from ./psycopg/psycopg.h:38,
                 from psycopg/psycopgmodule.c:27:
./psycopg/python.h:138: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:27:
./psycopg/psycopg.h:63: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:64: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:67: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:108: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:111: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:119: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:127: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:130: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:130: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:132: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:133: 错误:expected declaration specifiers or ‘...’ before ‘Py_ssize_t’
./psycopg/psycopg.h:134: 错误:expected ‘)’ before ‘*’ token
./psycopg/psycopg.h:135: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:138: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:140: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:142: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/psycopg.h:145: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ./psycopg/connection.h:29,
                 from psycopg/psycopgmodule.c:29:
./psycopg/xid.h:30: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xidType’
./psycopg/xid.h:33: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/xid.h:46: 错误:expected ‘)’ before ‘*’ token
./psycopg/xid.h:47: 错误:expected ‘)’ before ‘*’ token
./psycopg/xid.h:48: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/xid.h:49: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:29:
./psycopg/connection.h:76: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘connectionType’
./psycopg/connection.h:85: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/connection.h:152: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:153: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:154: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:156: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/connection.h:175: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:30:
./psycopg/cursor.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cursorType’
./psycopg/cursor.h:39: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/cursor.h:94: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/cursor.h:96: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
./psycopg/cursor.h:97: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
./psycopg/cursor.h:98: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:31:
./psycopg/replication_connection.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationConnectionType’
./psycopg/replication_connection.h:48: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/replication_connection.h:49: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ./psycopg/replication_cursor.h:30,
                 from psycopg/psycopgmodule.c:32:
./psycopg/libpq_support.h:31: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XLogRecPtr’
./psycopg/libpq_support.h:44: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘feGetCurrentTimestamp’
./psycopg/libpq_support.h:45: 错误:expected ‘)’ before ‘i’
./psycopg/libpq_support.h:46: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fe_recvint64’
In file included from psycopg/psycopgmodule.c:32:
./psycopg/replication_cursor.h:36: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationCursorType’
./psycopg/replication_cursor.h:44: 错误:字段‘last_io’的类型不完全
./psycopg/replication_cursor.h:45: 错误:字段‘keepalive_interval’的类型不完全
./psycopg/replication_cursor.h:47: 错误:expected specifier-qualifier-list before ‘XLogRecPtr’
In file included from psycopg/psycopgmodule.c:33:
./psycopg/replication_message.h:36: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘replicationMessageType’
./psycopg/replication_message.h:40: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:34:
./psycopg/green.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/green.h:59: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:35:
./psycopg/lobject.h:37: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobjectType’
./psycopg/lobject.h:40: 错误:expected specifier-qualifier-list before ‘PyObject’
./psycopg/lobject.h:60: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_read’
./psycopg/lobject.h:61: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_write’
./psycopg/lobject.h:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_seek’
./psycopg/lobject.h:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lobject_tell’
In file included from psycopg/psycopgmodule.c:36:
./psycopg/notify.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘notifyType’
./psycopg/notify.h:32: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:38:
./psycopg/typecast.h:34: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:39: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typecastType’
./psycopg/typecast.h:42: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/typecast.h:57: 错误:expected specifier-qualifier-list before ‘typecast_function’
./psycopg/typecast.h:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:65: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:69: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:74: 错误:expected ‘)’ before ‘*’ token
./psycopg/typecast.h:75: 错误:expected ‘)’ before ‘*’ token
./psycopg/typecast.h:78: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:81: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:83: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/typecast.h:87: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:39:
./psycopg/microprotocols.h:38: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:49: 错误:expected ‘)’ before ‘*’ token
./psycopg/microprotocols.h:51: 错误:expected ‘)’ before ‘*’ token
./psycopg/microprotocols.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:55: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/microprotocols.h:58: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:40:
./psycopg/microprotocols_proto.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘isqlquoteType’
./psycopg/microprotocols_proto.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:41:
./psycopg/error.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘errorType’
./psycopg/error.h:32: 错误:expected specifier-qualifier-list before ‘PyBaseExceptionObject’
./psycopg/error.h:41: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from psycopg/psycopgmodule.c:42:
./psycopg/diagnostics.h:31: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘diagnosticsType’
./psycopg/diagnostics.h:34: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:44:
./psycopg/adapter_qstring.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘qstringType’
./psycopg/adapter_qstring.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:45:
./psycopg/adapter_binary.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘binaryType’
./psycopg/adapter_binary.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:46:
./psycopg/adapter_pboolean.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pbooleanType’
./psycopg/adapter_pboolean.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:47:
./psycopg/adapter_pint.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pintType’
./psycopg/adapter_pint.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:48:
./psycopg/adapter_pfloat.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pfloatType’
./psycopg/adapter_pfloat.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:49:
./psycopg/adapter_pdecimal.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pdecimalType’
./psycopg/adapter_pdecimal.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:50:
./psycopg/adapter_asis.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘asisType’
./psycopg/adapter_asis.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:51:
./psycopg/adapter_list.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘listType’
./psycopg/adapter_list.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from psycopg/psycopgmodule.c:52:
./psycopg/typecast_binary.h:35: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘chunkType’
./psycopg/typecast_binary.h:38: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
psycopg/psycopgmodule.c:60:22: 错误:datetime.h:没有那个文件或目录
In file included from psycopg/psycopgmodule.c:61:
./psycopg/adapter_datetime.h:33: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pydatetimeType’
./psycopg/adapter_datetime.h:36: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
./psycopg/adapter_datetime.h:53: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:58: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:75: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:82: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:91: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:95: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:99: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
./psycopg/adapter_datetime.h:103: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:62: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:73: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:83: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:127: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:169: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:236: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c: 在函数‘psyco_libcrypto_threads_init’中:
psycopg/psycopgmodule.c:277: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:277: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
psycopg/psycopgmodule.c:277: 错误:所在的函数内也只报告一次。)
psycopg/psycopgmodule.c:277: 错误:‘m’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:280: 警告:隐式声明函数‘PyImport_ImportModule’
psycopg/psycopgmodule.c:284: 警告:隐式声明函数‘Py_DECREF’
psycopg/psycopgmodule.c:289: 警告:隐式声明函数‘PyErr_Clear’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:298: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:399: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:496: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:520: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:523: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:528: 错误:expected specifier-qualifier-list before ‘PyObject’
psycopg/psycopgmodule.c:532: 错误:‘Error’未声明(不在函数内)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:532: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:532: 警告:(在‘exctable[0]’的初始化附近)
psycopg/psycopgmodule.c:533: 错误:‘Warning’未声明(不在函数内)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:533: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:533: 警告:(在‘exctable[1]’的初始化附近)
psycopg/psycopgmodule.c:534: 错误:‘InterfaceError’未声明(不在函数内)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:534: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:534: 警告:(在‘exctable[2]’的初始化附近)
psycopg/psycopgmodule.c:535: 错误:‘DatabaseError’未声明(不在函数内)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:535: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:535: 警告:(在‘exctable[3]’的初始化附近)
psycopg/psycopgmodule.c:536: 错误:‘InternalError’未声明(不在函数内)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:536: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:536: 警告:(在‘exctable[4]’的初始化附近)
psycopg/psycopgmodule.c:537: 错误:‘OperationalError’未声明(不在函数内)
psycopg/psycopgmodule.c:537: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:537: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:537: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:537: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:538: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:538: 警告:(在‘exctable[5]’的初始化附近)
psycopg/psycopgmodule.c:539: 错误:‘ProgrammingError’未声明(不在函数内)
psycopg/psycopgmodule.c:539: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:539: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:539: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:539: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:540: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:540: 警告:(在‘exctable[6]’的初始化附近)
psycopg/psycopgmodule.c:541: 错误:‘IntegrityError’未声明(不在函数内)
psycopg/psycopgmodule.c:541: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:541: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:541: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:541: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:542: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:542: 警告:(在‘exctable[7]’的初始化附近)
psycopg/psycopgmodule.c:543: 错误:‘DataError’未声明(不在函数内)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:543: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:543: 警告:(在‘exctable[8]’的初始化附近)
psycopg/psycopgmodule.c:544: 错误:‘NotSupportedError’未声明(不在函数内)
psycopg/psycopgmodule.c:544: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:544: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:544: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:544: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:545: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:545: 警告:(在‘exctable[9]’的初始化附近)
psycopg/psycopgmodule.c:546: 错误:‘QueryCanceledError’未声明(不在函数内)
psycopg/psycopgmodule.c:546: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:546: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:547: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:547: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:547: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:547: 警告:(在‘exctable[10]’的初始化附近)
psycopg/psycopgmodule.c:549: 错误:‘TransactionRollbackError’未声明(不在函数内)
psycopg/psycopgmodule.c:549: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:549: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c:549: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:549: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c:550: 警告:结构初始值设定项中有多余元素
psycopg/psycopgmodule.c:550: 警告:(在‘exctable[11]’的初始化附近)
psycopg/psycopgmodule.c: 在函数‘psyco_errors_init’中:
psycopg/psycopgmodule.c:563: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:563: 错误:‘dict’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:564: 错误:‘str’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:565: 警告:ISO C90 不允许混合使用声明和代码
psycopg/psycopgmodule.c:568: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:571: 警告:隐式声明函数‘PyDict_New’
psycopg/psycopgmodule.c:573: 错误:‘struct <anonymous>’没有名为‘docstr’的成员
psycopg/psycopgmodule.c:574: 警告:隐式声明函数‘PyString_FromString’
psycopg/psycopgmodule.c:574: 错误:‘struct <anonymous>’没有名为‘docstr’的成员
psycopg/psycopgmodule.c:575: 警告:隐式声明函数‘PyDict_SetItemString’
psycopg/psycopgmodule.c:576: 警告:隐式声明函数‘Py_CLEAR’
psycopg/psycopgmodule.c:581: 错误:‘struct <anonymous>’没有名为‘exc’的成员
psycopg/psycopgmodule.c:581: 警告:隐式声明函数‘PyErr_NewException’
psycopg/psycopgmodule.c:583: 错误:‘struct <anonymous>’没有名为‘base’的成员
psycopg/psycopgmodule.c:583: 错误:‘struct <anonymous>’没有名为‘base’的成员
psycopg/psycopgmodule.c:583: 错误:‘PyExc_StandardError’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:593: 警告:隐式声明函数‘Py_XDECREF’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:599: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:616: 错误:expected ‘)’ before ‘*’ token
psycopg/psycopgmodule.c:637: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c: 在函数‘psyco_is_main_interp’中:
psycopg/psycopgmodule.c:680: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:680: 错误:‘main_interp’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:681: 错误:‘PyInterpreterState’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:681: 错误:‘interp’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:684: 警告:隐式声明函数‘PyThreadState_Get’
psycopg/psycopgmodule.c:684: 错误:‘->(有‘int’)的实参类型无效
psycopg/psycopgmodule.c:688: 警告:隐式声明函数‘PyInterpreterState_Head’
psycopg/psycopgmodule.c:693: 警告:隐式声明函数‘assert’
psycopg/psycopgmodule.c: 在文件层:
psycopg/psycopgmodule.c:708: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:748: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psycopg/psycopgmodule.c:802: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘psycopgMethods’
psycopg/psycopgmodule.c: 在函数‘init_psycopg’中:
psycopg/psycopgmodule.c:882: 错误:‘PyObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:882: 错误:‘c_api_object’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 错误:‘module’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 错误:‘dict’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:885: 警告:逗号表达式的左操作数不起作用
psycopg/psycopgmodule.c:895: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:895: 错误:‘connectionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:895: 错误:‘PyType_Type’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:896: 警告:隐式声明函数‘PyType_Ready’
psycopg/psycopgmodule.c:898: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:898: 错误:‘cursorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:901: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:901: 错误:‘replicationConnectionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:904: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:904: 错误:‘replicationCursorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:907: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:907: 错误:‘replicationMessageType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:910: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:910: 错误:‘typecastType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:913: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:913: 错误:‘qstringType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:916: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:916: 错误:‘binaryType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:919: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:919: 错误:‘isqlquoteType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:922: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:922: 错误:‘pbooleanType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:925: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:925: 错误:‘pintType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:928: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:928: 错误:‘pfloatType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:931: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:931: 错误:‘pdecimalType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:934: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:934: 错误:‘asisType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:937: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:937: 错误:‘listType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:940: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:940: 错误:‘chunkType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:943: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:943: 错误:‘notifyType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:946: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:946: 错误:‘xidType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:949: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:949: 错误:‘errorType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:950: 错误:‘PyTypeObject’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:950: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:953: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:953: 错误:‘diagnosticsType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:956: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:956: 错误:‘lobjectType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:980: 错误:‘pyDateTimeModuleP’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:983: 警告:隐式声明函数‘PyErr_SetString’
psycopg/psycopgmodule.c:983: 错误:‘PyExc_ImportError’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:988: 错误:‘PyDateTime_IMPORT’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:993: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:993: 错误:‘pydatetimeType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:998: 警告:隐式声明函数‘Py_InitModule’
psycopg/psycopgmodule.c:998: 错误:‘psycopgMethods’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1004: 警告:隐式声明函数‘PyModule_GetDict’
psycopg/psycopgmodule.c:1012: 警告:隐式声明函数‘PyCObject_FromVoidPtr’
psycopg/psycopgmodule.c:1014: 警告:隐式声明函数‘PyModule_AddObject’
psycopg/psycopgmodule.c:1018: 错误:‘psycoEncodings’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1019: 警告:隐式声明函数‘psyco_encodings_fill’
psycopg/psycopgmodule.c:1020: 错误:‘psyco_null’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1021: 错误:‘psyco_DescriptionType’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1021: 警告:隐式声明函数‘psyco_make_description_type’
psycopg/psycopgmodule.c:1024: 警告:隐式声明函数‘PyModule_AddStringConstant’
psycopg/psycopgmodule.c:1026: 警告:隐式声明函数‘PyModule_AddIntConstant’
psycopg/psycopgmodule.c:1027: 警告:隐式声明函数‘PyModule_AddIntMacro’
psycopg/psycopgmodule.c:1030: 警告:隐式声明函数‘PyInt_FromLong’
psycopg/psycopgmodule.c:1034: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1035: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1036: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1037: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1038: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1039: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1040: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1041: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1042: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1043: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1044: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1045: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1046: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1047: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1048: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1049: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1050: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1051: 错误:expected expression before ‘)’ token
psycopg/psycopgmodule.c:1068: 警告:隐式声明函数‘typecast_init’
psycopg/psycopgmodule.c:1071: 警告:隐式声明函数‘microprotocols_init’
psycopg/psycopgmodule.c:1072: 警告:隐式声明函数‘psyco_adapters_init’
psycopg/psycopgmodule.c:1076: 警告:隐式声明函数‘psyco_errors_fill’
psycopg/psycopgmodule.c:1078: 错误:‘replicationPhysicalConst’未声明(在此函数内第一次使用)
psycopg/psycopgmodule.c:1078: 警告:隐式声明函数‘PyDict_GetItemString’
psycopg/psycopgmodule.c:1079: 错误:‘replicationLogicalConst’未声明(在此函数内第一次使用)

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
<http://initd.org/psycopg/docs/install.html>).

error: command 'gcc' failed with exit status 1

解决方法:

# 安装 python-devel 依赖包
[root@centos6 psycopg2-2.7.7]# yum install python-devel

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1976589.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【C++:jsoncpp库的配置CMAKE的安装】

CMAKE的安装&#xff1a; 安装路径&#xff1a;Download CMake安装就是无脑Next跳出以下窗口以上步骤完了之后&#xff0c;页面如此&#xff0c;然后点击generate jsoncpp库的配置&#xff1a; 打开生成的源文件所在路径&#xff0c;找到名为jsoncpp.sln的文件&#xff0c;以vs…

大数据信用报告怎么查?有哪些注意事项?

大数据信用对于有资金周转的人来说是比较重要的&#xff0c;主要由于大数据信用无形的被不少机构用于贷前风控&#xff0c;无论是机构要求的还是自查&#xff0c;提前了解大数据信用情况是常规操作&#xff0c;那大数据信用报告如何查询?有哪些需要注意的呢?本文详细为大家讲…

【Kubernetes】k8s集群的资源发布方式

目录 一.常见的发布方式 二.如何实现 1.滚动升级 2.蓝绿升级 3.实现金丝雀发布&#xff08;灰度发布&#xff09; 一.常见的发布方式 蓝绿发布&#xff1a;两套环境交替升级&#xff0c;旧版本保留一定时间便于回滚。优点 用户无感知&#xff0c;部署和回滚速度较快缺点 …

使用 Python 对雷达卫星 sar 图像进行降噪的三种方法

合成孔径雷达 (SAR) 图像广泛应用于各种领域(航空航天、军事、气象等)。问题是这种图像在其原始格式中受到噪点的影响。虽然这些图像通常也是沉重的文件,但从科学的角度来看,有效地对其进行去噪的任务似乎既具有挑战性,又在现实世界中非常有用。 卫星图像有两大类: 光学…

嵌入式C++、QML与MQTT:智能化农业灌溉管理系统设计思路(代码示例)

目录 一、项目概述 二、系统架构 三、环境搭建 1. 硬件环境 2. 软件环境 四、代码实现 1. 硬件端代码示例 2. 软件端代码示例 a. 后端代码&#xff08;Node.js MQTT&#xff09; b. 前端代码&#xff08;QML&#xff09; 五、项目总结 一、项目概述 随着全球对农业…

Xinference如何注册自定义模型

环境&#xff1a; Xinference 问题描述&#xff1a; Xinference如何注册自定义模型 解决方案&#xff1a; 1.写个model_config.json&#xff0c;内容如下 {"version": 1,"context_length": 2048,"model_name": "custom-llama-3"…

Java 中的缓冲流

字符流 前面学习的字节流和字符流都是基本流&#xff0c;其中字符流的底层其实已经在内存中创建了一个长度为8192的字节数组作为缓存区。而字节流中则是没有的。 在内存中增加缓冲区的目的是为了减少内存与硬盘的交互的次数&#xff0c;因为这一操作比较耗时。 下面是一个图…

PixelMaster - 图片像素化终极利器 !

PixelMaster 是将普通图像转变为令人惊叹的像素艺术杰作的终极工具。非常适合艺术家、设计师和像素艺术爱好者&#xff01; https://apps.apple.com/app/pixelmaster-image-pixelator/id6502478442 为什么选择 PixelMaster&#xff1f; • 自定义像素形状&#xff1a;选择或导…

【Linux修行路】进度条小程序

目录 ⛳️推荐 一、预备知识 1.1 回车换行 1.2 缓冲区 二、倒计时 2.1 注意事项 三、进度条 3.1 源代码 3.2 代码分析 3.2 实际使用场景 ⛳️推荐 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家…

安卓基本布局(上)

文章目录 LinerLayout线性布局RelativeLayout相对布局根据父容器定位根据兄弟组件定位margin偏移padding填充 LinerLayout线性布局 以水平或垂直的方式来排列界面中的控件。 常用属性详细描述orientation布局中组件的排列方式。horizonta&#xff1a;水平&#xff1b;vertical…

GPT-4o mini模型:小型化AI解决方案的创新应用案例

文章目录 每日一句正能量前言开发者视角初步接触与性能评估集成与开发流程成本效益分析创新应用案例面临的挑战与解决方案社区贡献与经验分享未来展望 性能评估处理能力与响应速度准确性与可靠性多功能性与灵活性资源效率可扩展性与集成性用户定制与微调 结论 成本效益分析初始…

C语言基础知识之函数指针和指针函数

函数指针和指针函数 函数指针和指针函数指向函数的指针返回指针值的函数指针函数和函数指针的区别 问题1_1代码1_1结果1_1 函数指针和指针函数 指向函数的指针 用函数指针变量调用函数 可以用指针变量指向整型变量、字符串、数组&#xff0c;也可以指向一个函数。一个…

ctfshow-web入门-sql注入(web176-web180)

目录 1、web176 2、web177 3、web178 4、web179 5、web180 1、web176 1 order by 4-- 闭合后简单判断了下字段数是 3 测试联合查询注入&#xff0c;存在关键字的过滤&#xff0c;包括 select 和 union &#xff08;后面经过测试实际只过滤了 select&#xff09; 大小写绕…

常⻅CMS漏洞

常⻅CMS漏洞 ⼀&#xff1a;WordPress ​ WordPress是⼀个以PHP和MySQL为平台的⾃由开源的博客软件和内容管理系统。WordPress具 有插件架构和模板系统。截⾄2018年4⽉&#xff0c;排名前1000万的⽹站中超过30.6%使⽤WordPress。 WordPress是最受欢迎的⽹站 内容管理系统。全…

Linux网络之多路转接——实用的epoll

目录 一、高级IO 1.1 概念 1.2 五种IO模型 1.3 小结 二、多路转接的实用派 2.1 epoll 接口 2.1.1 epoll_create 2.1.2 epoll_ctl 2.1.3 epoll_wait 2.2 epoll 底层原理 2.2.1 epoll_ctl 2.2.2 epoll_wait 2.2.3 epoll_create 三、 epoll 类的编写 3.1 类的框…

大数据-64 Kafka 高级特性 分区 分区重新分配 实测

点一下关注吧&#xff01;&#xff01;&#xff01;非常感谢&#xff01;&#xff01;持续更新&#xff01;&#xff01;&#xff01; 目前已经更新到了&#xff1a; Hadoop&#xff08;已更完&#xff09;HDFS&#xff08;已更完&#xff09;MapReduce&#xff08;已更完&am…

使用uwsgi部署Flask应用

前言&#xff1a;本人大四&#xff0c;研0&#xff0c;在24年暑假在杭州某互联网公司实习&#xff0c;本文用来记录自己在公司学到的东西。 uwsgi&#xff1a;uWSGI是一个Web服务器&#xff0c;它实现了WSGI协议、uwsgi、http等协议。Nginx中HttpUwsgiModule的作用是与uWSGI服…

集合的基本使用

数据和集合的区别 数组可以存储基本数据类型和引用数据类型。 但是&#xff0c;集合不可以直接存储基本数据类型&#xff0c;需要以包装类的方式进行存储&#xff0c;其可以存储引用数据类型。 ArrayList 成员方法 import java.util.ArrayList;/*** ClassName Test* author …

[Meachines] [Easy] Postman redis未授权访问-SSH公钥注入+RSA私钥解密+Webmin-RCE权限提升

信息收集 IP AddressOpening Ports10.10.10.160TCP:22,80,6379,10000 $ nmap -p- 10.10.10.160 --min-rate 1000 -sC -sV PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 2048…

计算机基础(Windows 10+Office 2016)教程 —— 第7章 演示文稿软件PowerPoint 2016

第7章 演示文稿软件PowerPoint 2016 7.1 PowerPoint 2016入门7.1.1 PowerPoint 2016 简介7.1.2 PowerPoint 2016 的操作界面组成7.1.3 PowerPoint 2016 的窗口视图方式7.1.4 PowerPoint 2016 的演示文稿及其操作7.1.5 PowerPoint 2016 的幻灯片及其操作 7.2 演示文稿的编辑与设…