get install openstack pkg 故障解决(2)

Setting up cinder-common (1:2015.1.0-0ubuntu1~cloud0) ...
/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/base.py:20: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.
  from oslo.config import cfg
Traceback (most recent call last):
  File "/usr/bin/cinder-manage", line 6, in <module>
    from cinder.cmd.manage import main
  File "/usr/lib/python2.7/dist-packages/cinder/cmd/manage.py", line 74, in <module>
    from cinder.common import config  # noqa
  File "/usr/lib/python2.7/dist-packages/cinder/common/config.py", line 105, in <module>
    help=_("DEPRECATED: Deploy v1 of the Cinder API.")),
  File "/usr/lib/python2.7/dist-packages/oslo_i18n/_factory.py", line 80, in f
    return _message.Message(msg, domain=domain)
  File "/usr/lib/python2.7/dist-packages/oslo_i18n/_message.py", line 51, in __new__
    msgtext = Message._translate_msgid(msgid, domain)
  File "/usr/lib/python2.7/dist-packages/oslo_i18n/_message.py", line 91, in _translate_msgid
    system_locale = locale.getdefaultlocale()
  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


但这部分已经说软件包由于系统环境的编码格式导致错误。

如果不处理,那在apt安装其他软件时还会报相同的错。

很多时候,我们会把这部分与上面的警告混在一起,从而转移注意力到其他地方。

解决方法为:

echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale


注:此环境的OS为ubuntu14.04。其他OS根据实际环境设置。

退出当前终端,重新登录,查看当前终端环境的locale:

# locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

再次使用apt-get安装即可成功。

下面是小编为你精选的Openstack相关知识,看看是否有你喜欢的

在Ubuntu 12.10 上安装部署Openstack

Ubuntu 12.04 OpenStack Swift单节点部署手册

OpenStack云计算快速入门教程

企业部署OpenStack:该做与不该做的事

CentOS 6.5 x64bit 快速安装OpenStack

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/16040.html