免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4762 | 回复: 11
打印 上一主题 下一主题

安装postgres时出错。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-02-25 10:36 |只看该作者 |倒序浏览
我安装postgres如下:
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
但,使用/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data时出错:
  The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale zh_CN.GB18030.
initdb: could not find suitable encoding for locale "zh_CN.GB18030"
Rerun initdb with the -E option.
Try "initdb --help" for more information.

使用/usr/local/pgsql/bin/initdb -E /usr/local/pgsql/d时:
nitdb: no data directory specified
You must identify the directory where the data for this database system
will reside.  Do this with either the invocation option -D or the
environment variable PGDATA.
请问我应怎么做?

论坛徽章:
0
2 [报告]
发表于 2005-02-25 11:14 |只看该作者

安装postgres时出错。

我也碰到过,不过解决了!
在环境变量中增加如下东东:
LC_COLLATE=C
LC_CTYPE=C
export LC_COLLATE LC_CTYPE
一切OK!

论坛徽章:
0
3 [报告]
发表于 2005-02-25 12:43 |只看该作者

安装postgres时出错。

这几个东东是做什么用的?
它真接在./configure里加入吗?
./configure LC_COLLATE=C LC_CTYPE=C export LC_COLLATE LC_CTYPE
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
checking build system type... Invalid configuration `export': machine `export' not recognized
configure: error: /bin/sh config/config.sub export failed
好像不行.

论坛徽章:
0
4 [报告]
发表于 2005-02-25 12:52 |只看该作者

安装postgres时出错。

加在post用户的.profile文件里

论坛徽章:
0
5 [报告]
发表于 2005-02-25 14:04 |只看该作者

安装postgres时出错。

.bash_profile内容如下:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin

export PATH
unset USERNAME
应放在哪个位置?

论坛徽章:
0
6 [报告]
发表于 2005-02-25 14:14 |只看该作者

安装postgres时出错。

放在哪里无所谓,如下即可:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin

LC_COLLATE=C
LC_CTYPE=C
export LC_COLLATE LC_CTYPE

export PATH
unset USERNAME

论坛徽章:
0
7 [报告]
发表于 2005-02-25 14:55 |只看该作者

安装postgres时出错。

在运行/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale zh_CN.GB18030.
initdb: could not find suitable encoding for locale "zh_CN.GB18030"
Rerun initdb with the -E option.
Try "initdb --help" for more information.
这个zh_CN.GB18030是什么东东?

论坛徽章:
0
8 [报告]
发表于 2005-02-25 18:29 |只看该作者

安装postgres时出错。

这个zh_CN.GB18030是什么东东?]

是最新的中文国际化标准。

论坛徽章:
0
9 [报告]
发表于 2005-02-25 20:27 |只看该作者

安装postgres时出错。

那我应怎么做?

论坛徽章:
0
10 [报告]
发表于 2005-02-25 21:07 |只看该作者

安装postgres时出错。

你的.profile里是不是没有以下变量:
USER=postgres
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export USER LD_LIBRARY_PATH
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP