在 Windows 上安装 PostGIS

发布于 2024-08-31 04:24:48 字数 679 浏览 3 评论 0原文

我已经安装了 PostgreSQL 和 PostGIS,现在我尝试按照以下说明操作: http://docs.djangoproject.com/en /dev/ref/contrib/gis/install/#spatialdb-template

但我在命令提示符和 Cygwin 中不断收到以下错误:

C:\Users\Home>createdb -E UTF8 template_postgis
createdb: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

我知道 PostgreSQL 正在运行,因为我正确使用了它现在!

安装开源应用程序有时会非常令人沮丧......

我将非常感谢您的帮助!

I've installed PostgreSQL and PostGIS, and now I'm trying to follow these instructions:
http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#spatialdb-template

But I keep getting the following error, both in the command prompt and in Cygwin:

C:\Users\Home>createdb -E UTF8 template_postgis
createdb: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

And I know PostgreSQL is running, because I'm using it right now!

Installing open source applications can sometimes be so frustrating...

I'll be very grateful for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羅雙樹 2024-09-07 04:24:48

你有机会在这里使用 cygwin 吗?特别是,系统是否从 cygwin 二进制文件中获取 createdb?

如果您的服务器是cygwin,请尝试将其删除并替换为Windows版本。

如果您的服务器是 Windows 版本,但您已从 PATH 中的 cygwin 安装创建了 createb,请尝试从 PATH 中删除 cygwin 以确保您选择了 Windows 版本的createdb。

Are you by any chance using cygwin here? Particuarly, is the system picking up createdb from a cygwin binary?

If your server is cygwin, try removing it and replace it with the Windows version.

If your server is the Windows version, but you have createdb from a cygwin install in the PATH, try removing cygwin from your PATH to make sure you pick up the Windows version of createdb.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文