ubuntu mysqldb安装不正确
发布时间:2020-05-22 16:07:08 所属栏目:Ubuntu 来源:互联网
导读:我正在运行以下命令并收到以下错误: root# sudo python manage.py syncdbTraceback (most recent call last): File manage.py, line 14, in module execute_manager(settings) File /usr/lib/pymodules/python2.6/djan
|
我正在运行以下命令并收到以下错误: root# sudo python manage.py syncdb
Traceback (most recent call last):
File "manage.py",line 14,in <module>
execute_manager(settings)
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",line 438,in execute_manager
utility.execute()
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",line 379,in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",line 261,in fetch_command
klass = load_command_class(app_name,subcommand)
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",line 67,in load_command_class
module = import_module('%s.management.commands.%s' % (app_name,name))
File "/usr/lib/pymodules/python2.6/django/utils/importlib.py",line 35,in import_module
__import__(name)
File "/usr/lib/pymodules/python2.6/django/core/management/commands/syncdb.py",line 7,in <module>
from django.core.management.sql import custom_sql_for_model,emit_post_sync_signal
File "/usr/lib/pymodules/python2.6/django/core/management/sql.py",line 5,in <module>
from django.contrib.contenttypes import generic
File "/usr/lib/pymodules/python2.6/django/contrib/contenttypes/generic.py",line 6,in <module>
from django.db import connection
File "/usr/lib/pymodules/python2.6/django/db/__init__.py",line 77,in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/usr/lib/pymodules/python2.6/django/db/utils.py",line 91,in __getitem__
backend = load_backend(db['ENGINE'])
File "/usr/lib/pymodules/python2.6/django/db/utils.py",line 32,in load_backend
return import_module('.base',backend_name)
File "/usr/lib/pymodules/python2.6/django/utils/importlib.py",in import_module
__import__(name)
File "/usr/lib/pymodules/python2.6/django/db/backends/mysql/base.py",in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
我有一种感觉,mysqldb没有正确配置django,我想知道我是否缺少任何东西.我在它之前运行了以下命令: # apt-get install python-django # apt-get install python-mysqldb我有同样的问题,我的virtualenv被打破了,当我升级到ubuntu 12.04时无法运行django. 我只是跑(当我的活动时) pip uninstall MySQL-python 然后重新安装它 pip install MySQL-python 之后再次工作正常. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
