postgresql - 在没有 yum 的情况下在 CentOS 5.5 中安装 pg_config

标签 postgresql centos

python 版本 2.4

# pip 安装 psycopg2

出现以下错误:

下载/解压 psycopg2 为包 psycopg2 运行 setup.py egg_info

Error: pg_config executable not found.

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'.
Complete output from command python setup.py egg_info:
running egg_info

 writing pip-egg-info/psycopg2.egg-info/PKG-INFO
 writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
 writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
 warning: manifest_maker: standard file '-c' not found

Error: pg_config executable not found.
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'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /root/sources/build/psycopg2
Storing complete log in /root/.pip/pip.log
[root@host sources]# which pg_config
/usr/bin/which: no pg_config in     (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/b    in:/root/bin)

我无法将 pg_config 安装为可执行文件

最佳答案

您需要安装postgresql-devel 包。

或者从源代码构建 Postgres,然后你将拥有 pg_config 而不是来自包。

关于postgresql - 在没有 yum 的情况下在 CentOS 5.5 中安装 pg_config,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9600111/

相关文章:

ruby-on-rails - 带有 Resque 的 Heroku 上的 Postgres 错误

linux - Yum 在 'Loading mirror speeds' 或 'Setting package sacks' 卡住

node.js - Linux Node JS 监听端口 80 但不监听其他端口

ruby-on-rails - 转换为自定义类型的 PostgreSQL 数组

postgresql - 在 PL/pgSQL 中循环遍历结果集时检查该行是否是最后一行

postgresql - 为什么 "select table_name from table_name"有效

sql - 将每场比赛 3 名玩家的分数保存到 PostgreSQL 中

python - amazon ec2 centOS 上没有名为 tkinter 的模块

shell - 环境变量不会在 shell 脚本中设置

linux - c 服务器处理多个连接,端口号错误