定位 libmysqlclient_r.so.16 问题

Posted

技术标签:

【中文标题】定位 libmysqlclient_r.so.16 问题【英文标题】:locate libmysqlclient_r.so.16 issue 【发布时间】:2012-11-23 20:20:14 【问题描述】:

首先要建议我是新手,而我的网页设计师不在国外。我有以下问题并寻求一些建议。我已经重新安装了 mysqldb 并升级了软件包。我和我的托管公司谈过,他们建议他们升级到 mysql 5.5。

我搜索了 web 和 ***,并尝试了上述许多不同的解决方案。

这是来自服务器错误日志的错误:

    [Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: Traceback (most recent call last):
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 574, in run
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     protocolStatus, appStatus = self.server.handler(self)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 1159, in handler
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     result = self.application(environ, start_response)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 194, in __call__
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     self.load_middleware()
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/base.py", line 38, in load_middleware
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     mod = __import__(mw_module, , , [''])
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/middleware.py", line 1, in 
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     from django.contrib.flatpages.views import flatpage
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/views.py", line 1, in 
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     from django.contrib.flatpages.models import FlatPage
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/models.py", line 2, in 
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     from django.db import models
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/__init__.py", line 17, in 
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), , , [''])
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:   File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in 
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr:     raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
[Wed Dec 05 12:12:47 2012] [warn] [client 146.145.36.41] mod_fcgid: stderr: ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory

这又是同样的错误,但通过 python:

python jdm_cars.fcgi

WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
/home1/elitejdm/python/lib/python2.5/site-packages/MySQL_python_embedded-1.2.3-py2.5-linux-x86_64.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /home1/elitejdm/python/lib/python2.5/site-packages/MySQL_python_embedded-1.2.3-py2.5-linux-x86_64.egg/_mysql.py, but /home1/elitejdm/public_html/new_elitejdm/MySQL-python-1.2.3 is being added to sys.path
  import sys, pkg_resources, imp
Traceback (most recent call last):
  File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 574, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/home1/elitejdm/python/lib/python2.5/site-packages/flup-1.0.3.dev_20110405-py2.5.egg/flup/server/fcgi_base.py", line 1159, in handler
    result = self.application(environ, start_response)
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 194, in __call__
    self.load_middleware()
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/core/handlers/base.py", line 38, in load_middleware
    mod = __import__(mw_module, , , [''])
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/middleware.py", line 1, in <module>
    from django.contrib.flatpages.views import flatpage
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/views.py", line 1, in <module>
    from django.contrib.flatpages.models import FlatPage
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/contrib/flatpages/models.py", line 2, in <module>
    from django.db import models
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/__init__.py", line 17, in <module>
    backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), , , [''])
  File "/home/elitejdm/python/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
Status: 500 Internal Server Error
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>Unhandled Exception</title>
</head><body>
<h1>Unhandled Exception</h1>
<p>An unhandled exception was thrown by the application.</p>
</body></html>

在写这篇文章时,我从我的托管公司那里发现了更多信息,我被告知以下内容

基本上我们将 libmysqlclient 更新为: libmysqlclient_r.so.18

来自: libmysqlclient_r.so.16

由于处于共享托管环境中,我们必须使这些 不时更新。看来这是导致您的原因 悲伤/问题。

您要么需要在本地重新安装 libmysqlclient_r.so.16 您的服务器没有 root 访问权限。 (没有百胜)

OR B 配置您的脚本以处理新的 .18 版本。

如果您采用第一种方式,则以后无需更新。如果 你用第二种方法,我们决定再次更新。它会 要求您再次更新脚本

对此很陌生,所以我不知道该怎么做,但愿意学习...请任何帮助表示赞赏。

【问题讨论】:

您能告诉我们您正在运行什么发行版,以及 django 是如何安装的吗? 我不确定 django 是如何安装的。我不是设计师。他正在休假。至于版本,你去吧! Linux 版本 2.6.32-20120131.55.1.bh6.x86_64 (machbuild@build6.bluehost.com) (gcc 版本 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)) #1 SMP 1 月 31 日 15 日星期二: 2012 年美国东部标准时间 43:27 至于django你指的是easy_install吗? 【参考方案1】:

Python module issue

请查看此线程的第二个答案。修复了我的问题。

【讨论】:

以上是关于定位 libmysqlclient_r.so.16 问题的主要内容,如果未能解决你的问题,请参考以下文章

hue集成mysql找不到 libmysqlclient.so.16问题解决

讲讲相对定位、绝对定位、固定定位的理解?

CSS绝对定位与相对定位的区别?

HTML+CSS中关于绝对定位和相对定位定位的优缺点以及该注意的地方,现在最好的定位方式是怎么定位?

Gps定位和wifi定位和基站定位的比较

GPS定位器定位不准是啥原因