Ubuntu   发布时间:2022-05-10  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ubuntu mysqldb安装不正确大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在运行以下命令并收到以下错误:
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

之后再次工作正常.

大佬总结

以上是大佬教程为你收集整理的ubuntu mysqldb安装不正确全部内容,希望文章能够帮你解决ubuntu mysqldb安装不正确所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: