作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在访问 tracd 服务器时遇到以下错误,这是怎么回事?
谢谢。
[oke@localhost Trac-0.11.7]$ sudo tracd -p 8000 /home/deddihp/trac/Server starting in PID 5082.Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/----------------------------------------Exception happened during processing of request from ('127.0.0.1', 47804)Traceback (most recent call last): File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__ self.handle() File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle self.handle_one_request() File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 194, in handle_one_request gateway.run(self.server.application) File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 94, in run response = application(self.environ, self._start_response) File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/standalone.py", line 100, in __call__ return self.application(environ, start_response) File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/main.py", line 346, in dispatch_request locale.setlocale(locale.LC_ALL, environ['trac.locale']) File "/usr/lib/python2.6/locale.py", line 513, in setlocale return _setlocale(category, locale)Error: unsupported locale setting----------------------------------------
最佳答案
您必须安装缺少的语言环境。使用命令“locale”检查哪些环境变量无法设置。
[calvin@hobbes:~]$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=en_US
然后使用命令“locale-gen”安装缺少的“en_US”区域设置:
[calvin@hobbes:~]$ sudo locale-gen en_US
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
最后,使用命令“dpkg-reconfigure”重新配置所有可用的区域设置:
[calvin@hobbes:~]$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = "en_US",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_GB.ISO-8859-1... done
en_GB.ISO-8859-15... done
en_GB.UTF-8... done
en_US.ISO-8859-1... done
en_US.ISO-8859-15... done
en_US.UTF-8... done
pt_PT.ISO-8859-1... done
pt_PT.UTF-8... done
pt_PT.ISO-8859-15@euro... done
Generation complete.
然后您可以在“locale”命令输出中看到不再有错误:
[calvin@hobbes:~]$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=en_US
重新启动你的tracd服务器,你应该没问题了。
问候
关于tracd 服务器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2689071/
我在访问 tracd 服务器时遇到以下错误,这是怎么回事? 谢谢。 [oke@localhost Trac-0.11.7]$ sudo tracd -p 8000 /home/deddihp/trac
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我是一名优秀的程序员,十分优秀!