Errors while compiling Varnish 3 on ubuntu 14.10

Altaf Hussain asked:

I am new to linux and ubuntu and it is my first time to compile anything on linux. I am trying to compile varnish on ubuntu 14.10, but i got the following errors:

   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/", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/usr/lib/python2.7/dist-packages/docutils/", line 41, in <module>
    import docutils.utils
  File "/usr/lib/python2.7/dist-packages/docutils/utils/", line 20, in <module>
  File "/usr/lib/python2.7/dist-packages/docutils/", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/lib/python2.7/dist-packages/docutils/utils/", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/lib/python2.7/", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/", 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

I have read the following article, but it did not helped.

Unable to compile latest Varnish on Debian 6

For installation, i followed these steps:

Kindly help me with this issue.

Thank you

My answer:

You are probably not using a UTF-8 locale on your system.

You can temporarily work around this in your shell by setting your locale to a UTF-8 locale, for instance:

export LC_ALL=ur_PK.UTF-8
export LANG=ur_PK.UTF-8

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.