标题: 安装postgres时出错。 [打印本页] 作者: dfzx 时间: 2005-02-25 10:36 标题: 安装postgres时出错。 我安装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.
请问我应怎么做?作者: abchgd 时间: 2005-02-25 11:14 标题: 安装postgres时出错。 我也碰到过,不过解决了!
在环境变量中增加如下东东:
LC_COLLATE=C
LC_CTYPE=C
export LC_COLLATE LC_CTYPE
一切OK!作者: dfzx 时间: 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
好像不行.作者: abchgd 时间: 2005-02-25 12:52 标题: 安装postgres时出错。 加在post用户的.profile文件里作者: dfzx 时间: 2005-02-25 14:04 标题: 安装postgres时出错。 .bash_profile内容如下:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
export PATH
unset USERNAME作者: dfzx 时间: 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是什么东东?作者: dingjeff 时间: 2005-02-25 18:29 标题: 安装postgres时出错。 这个zh_CN.GB18030是什么东东?]