GBase8c psycopg2安装(centos6)

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_extError: 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 directoryIt 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_extError: 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.rhkb.cn/news/389271.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

B站安全开发流程落地实践

一. 什么是安全开发生命周期&#xff08;SDL&#xff09; 1.1 SDL诞生背景 随着互联网技术的快速发展&#xff0c;网络系统及应用在给人们的生活带来巨大便利的同时&#xff0c;信息安全问题也逐渐成为用户和企业关注的焦点。然而&#xff0c;安全问题的管理和解决需要一个系统…

武汉流星汇聚:亚马逊Prime会员日后,确保持续稳定出单的五大策略

随着亚马逊Prime会员日的圆满落幕&#xff0c;无数商家沉浸在销售高峰的喜悦之中&#xff0c;但狂欢之后的冷静思考同样重要。对于所有卖家而言&#xff0c;如何在会员日热潮退去后&#xff0c;依然保持稳定的订单量&#xff0c;成为关乎长远发展的关键。以下&#xff0c;武汉流…

MySQL数据库入门基础知识 【1】推荐

数据库就是储存和管理数据的仓库&#xff0c;对数据进行增删改查操作&#xff0c;其本质是一个软件。 首先数据有两种&#xff0c;一种是关系型数据库&#xff0c;另一种是非关系型数据库。 关系型数据库是以表的形式来存储数据&#xff0c;表和表之间可以有很多复杂的关系&a…

nova7(华为)相机关闭画质优化

模板 文章目录 模板 如果对你有帮助&#xff0c;就点赞收藏把&#xff01;(&#xff61;&#xff65;ω&#xff65;&#xff61;)&#xff89;♡ 不知道大家有没有遇到这种苦恼 想拍一张&#xff0c;夜景照片 明明按下快门的时候还是如上图所示 但是到图库就只能看到下图的照片…

多路径 bbr mpbbr 公平性推演

mptcp 推出很久了&#xff0c;先看 rfc6356 三原则&#xff1a; 对自己&#xff0c;mptcp 的吞吐不能比用 sp(single path)tcp 时更差&#xff1b;对它者&#xff0c;mptcp 子流对资源的占用不能侵害其它 sptcp 流量&#xff1b;负载分担&#xff0c;要将孬 subflow 流量分担到…

SX_初识GitLab_1

1、对GitLab的理解&#xff1a; 目前对GitLab的理解是其本质是一个远程代码托管平台&#xff0c;上面托管多个项目&#xff0c;每个项目都有一个master主分支和若干其他分支&#xff0c;远程代码能下载到本机&#xff0c;本机代码也能上传到远程平台 1.分支的作用&#xff1a…

20.rabbitmq插件实现延迟队列

问题 前面谈到基于死信的延迟队列&#xff0c;存在的问题&#xff1a;如果第一个消息延时时间很长&#xff0c;而第二个消息延时时间很短&#xff0c;第二个消息并不会优先得到执行。 下载插件 地址&#xff1a;https://github.com/rabbitmq/rabbitmq-delayed-message-excha…

JAVA基础 - 反射

目录 一. 简介 二. java.lang.Class类 三. java.lang.reflect包 四. 创建对象 五. 调用方法 六. 调用成员变量 一. 简介 反射是 Java 语言中的一种强大机制&#xff0c;允许程序在运行时动态地获取类的信息、访问类的成员&#xff08;包括字段、方法和构造函数&#xff…

Tomato靶机攻略

1、启动靶机 2、通过nmap -sA 192.168.168.0/24得到靶机IP 3、扫描目录 用dirb http://192.168.49.128扫描敏感目录 4、访问敏感目录 5、通过查看源码&#xff0c;发现其存在文件包含漏洞&#xff0c;利用该漏洞查看日志文件 http://192.168.168.131/antibot_image/antibots/…

gitee的fork

通过fork操作&#xff0c;可以复制小组队长的库。通过复制出一模一样的库&#xff0c;先在自己的库修改&#xff0c;最后提交给队长&#xff0c;队长审核通过就可以把你做的那一份也添加入库 在这fork复制一份到你自己的仓库&#xff0c;一般和这个项目同名 现在你有了自己的库…

vue2以及vue3基于el-table实现表格正则校验功能

常见需求&#xff1a; 在项目中&#xff0c;通常会在表格中添加多条数据&#xff0c;并需要对添加的数据进行校验功能&#xff0c;这时候就是很头疼的事了&#xff0c;下面酱酱仔给你们写个示例&#xff0c;你们无脑粘贴复制即可。 注意事项&#xff1a; 1、校验里面用到了正…

【Unity】3D功能开发入门系列(一)

Unity3D功能开发入门系列&#xff08;一&#xff09; 一、开发环境&#xff08;一&#xff09;安装 Unity&#xff08;二&#xff09;创建项目&#xff08;三&#xff09;Unity 窗口布局 二、场景与视图&#xff08;一&#xff09;场景&#xff08;二&#xff09;游戏物体&…

前端日历插件VCalendar

官网地址 API | VCalendar 1.安装 yarn add v-calendarnext popperjs/core 2.全局引入 mian.js //日历插件 import VCalendar from v-calendar; import v-calendar/style.css;app.use(VCalendar); 3.使用 <div><VCalendar reservationTime expanded borderless…

java各种锁有什么区别

Java 虚拟机&#xff08;JVM&#xff09;中有几种不同类型的锁&#xff0c;每种锁都有其特定的用途和性能特点。下面我将为你介绍几种常见的锁&#xff1a; 1.独占锁&#xff08;也称为悲观锁&#xff09;&#xff1a; 1.synchronized&#xff1a;这是 Java 提供的一种内置的独…

股指期货的套利策略存在哪些风险?

股指期货套利的交易策略。它能够纠正市场上不合理的价格偏差&#xff0c;将价格拉回到正常的轨道。套利交易以其稳健的收益吸引着投资者&#xff0c;但同时也容易让人陷入一个误区——认为套利是无风险的。实际上&#xff0c;套利同样存在风险&#xff0c;只是相对于纯粹的投机…

问题易如反掌?5个常用的AI人工智能助手推荐

&#x1f3ac; 鸽芷咕&#xff1a;个人主页 &#x1f525; 个人专栏: 《C干货基地》《粉丝福利》 ⛺️生活的理想&#xff0c;就是为了理想的生活! 如今的人工智能技术正以惊人的速度改变着我们的生活方式和工作方式。作为这一变革的关键驱动力&#xff0c;人工智能不仅在科技…

短剧CPS分销系统框架+资源对接是怎么对接的?

目录 前言&#xff1a; 一、前端uniapp内容有什么&#xff1f; 二、后台管理 三、搭建CPS需要准备什么&#xff1f; 总结&#xff1a; 前言&#xff1a; 目前短剧目前在国内是非常的热门&#xff0c;观看的人群非常的多。如果希望能够通过推广短剧来做副业的话&#xff0c…

深入理解PreparedStatement

预处理 Overridepublic boolean login(String username, String userpwd) {Connection con DBUtils.getConnection();try {if(con ! null){PreparedStatement pstmt con.prepareStatement("select username,userpwd from " " users where username? and us…

硬核!288页Python核心知识笔记(附思维导图,建议收藏)

不少朋友在学习Python时&#xff0c;都会做大量的笔记&#xff0c;随着学习进度的增加&#xff0c;笔记越来越厚&#xff0c;但有效内容反而越来越少。 今天就给大家分享一份288页Python核心知识笔记&#xff0c;相较于部分朋友乱糟糟的笔记&#xff0c;这份笔记更够系统地总结…