执行时出现“psycopq2.OperationalError”:python manage.py syncdb。使用 djangostack 脚本进行测试时,postgresql 服务器似乎已启动并正在运行。有人遇到过这个吗?只需阅读 django 教程并进行设置。该框架的完整新手...我在这个论坛上发现了很多类似的问题,但似乎没有一个完全匹配...谢谢!
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs
cursor = connection.cursor()
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/db/backends/__init__.py", line 75, in cursor
cursor = self._cursor()
File "/Applications/djangostack-1.2.5-0/apps/django/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 136, in _cursor
self.connection = Database.connect(**conn_params)
psycopg2.OperationalError: 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"?