我是 Linux 和 ubuntu 的新手,这是我第一次在 Linux 上编译任何东西。我试图在 ubuntu 14.10 上编译 varnish,但出现以下错误:
Traceback (most recent call last):
File "/usr/bin/rst2man", line 21, in <module>
from docutils.core import publish_cmdline, default_description
File "/usr/lib/python2.7/dist-packages/docutils/core.py", line 20, in <module>
from docutils import frontend, io, utils, readers, writers
File "/usr/lib/python2.7/dist-packages/docutils/frontend.py", line 41, in <module>
import docutils.utils
File "/usr/lib/python2.7/dist-packages/docutils/utils/__init__.py", line 20, in <module>
import docutils.io
File "/usr/lib/python2.7/dist-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/usr/lib/python2.7/dist-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Makefile:735: recipe for target 'vmod_std.3' failed
make[3]: *** [vmod_std.3] Error 1
make[3]: Leaving directory '/home/altaf/Desktop/varnish3/Varnish-Cache/lib/libvmod_std'
Makefile:389: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/altaf/Desktop/varnish3/Varnish-Cache/lib'
Makefile:489: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/altaf/Desktop/varnish3/Varnish-Cache'
Makefile:397: recipe for target 'all' failed
make: *** [all] Error 2
我已阅读以下文章,但没有帮助。
对于安装,我遵循以下步骤:
https://www.varnish-cache.org/docs/3.0/installation/install.html#compiling-varnish-from-source
请帮助我解决这个问题。
谢谢
答案1
您的系统上可能没有使用 UTF-8 语言环境。
您可以在 shell 中通过将语言环境设置为 UTF-8 来临时解决此问题,例如:
export LC_ALL=ur_PK.UTF-8
export LANG=ur_PK.UTF-8