apt-get install openstack pkg 故障处理

操作系统为Ubuntu14.04

在Openstack软件包安装过程中,主机的DNS没问题,软件源的仓库也是正确的,为什么总是出现软件包安装错误呢?

报错如下:

# apt-get install cinder-api cinder-scheduler cinder-volume python-cinderclient -y

Reading package lists... Done

Building dependency tree

Reading state information... Done

cinder-api is already the newest version.

cinder-scheduler is already the newest version.

cinder-volume is already the newest version.

python-cinderclient is already the newest version.

The following packages were automatically installed and are no longer required:

libboost-iostreams1.46.1 libclass-isa-perl libswitch-perl

Use ‘apt-get autoremove‘ to remove them.

0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

4 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = "en_US:en",

LC_ALL = (unset),

LC_CTYPE = "UTF-8",

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_ALL to default locale: No such file or directory

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

dpkg: error processing package cinder-common (--configure):

subprocess installed post-installation script returned error exit status 1

dpkg: dependency problems prevent configuration of cinder-volume:

cinder-volume depends on cinder-common (= 1:2015.1.0-0ubuntu1~cloud0); however:

Package cinder-common is not configured yet.

dpkg: error processing package cinder-volume (--configure):

dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of cinder-api:

cinder-api depends on cinder-common (= 1:2015.1.0-0ubuntu1~cloud0); however:

Package cinder-common is not configured yet.

dpkg: error processing package cinder-api (--configure):

dependency problems - leaving unconfigured

dpkg: dependency problems prevent configuration of cinder-scheduler:

cinder-scheduler depends on cinder-common (= 1:2015.1.0-0ubuntu1~cloud0); however:

Package cinder-common is not configured yet.

dpkg: error processing package cinder-scheduler (--configure):

dependency problems - leaving unconfigured

No apport report written because the error message indicates its a followup error from a previous failure.

No apport report written because the error message indicates its a followup error from a previous failure.

No apport report written because MaxReports is reached already

Errors were encountered while processing:

cinder-common

cinder-volume

cinder-api

cinder-scheduler

E: Sub-process /usr/bin/dpkg returned an error code (1)

屏幕上的报错,一下跳到最后,怎么检查都没查出来。

于是回头分析报错的根源:

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = "en_US:en",

LC_ALL = (unset),

LC_CTYPE = "UTF-8",

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_ALL to default locale: No such file or directory

这几个警告是提示系统环境的locale设置,太常见很容易忽略。

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安装即可成功。

时间: 2024-10-08 10:44:09

apt-get install openstack pkg 故障处理的相关文章

Centos7 install Openstack - (第四节)添加计算服务(Nova)

Centos7 install Openstack - (第四节)添加计算服务(Nova) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack官方文档配置 官方文档地址: http://docs.openstack.org/juno/install-guide/install/yum/content/# 0x01. Install and configure controller node (在控制节点安装配置一下内容) 一) 配置基本环境

Deepin 15.11 安装软件出现“您也许需要运行“apt --fix-broken install”来修正上面的错误

解决方案: #sudo apt --fix-broken install -y 原文地址:https://www.cnblogs.com/xlpc/p/12317000.html

Install OpenStack Kilo

安装openstack k版本 OS:CentOS Linux release 7.0.1406 (Core)host: node1  (管理):10.10.0.10   10.20.0.10 10.30.0.10node2(网络):10.10.0.20    10.20.0.20  10.30.0.20    192.168.74.211node2(计算):10.10.0.30    10.20.0.30   10.30.0.30 1:环境准备1):关闭防火墙 systemctl stop f

Install OpenStack Kilo Dashboard wiht Nginx + uWSGI On RHEL7.1

一.安装Horizon.Nginx.uWSGI yum install -y uwsgi-plugin-python openstack-dashboard uwsgi nginx 二.配置uWSGI cat >/etc/uwsgi.ini <<EOF [uwsgi] plugins = python master = true processes = 10 threads = 2 chmod-socket = 666 socket = 127.0.0.1:9000 pidfile =

解决ubuntu使用命令sudo apt -get install 安装东西时出现&quot;E: Sub-process /usr/bin/dpkg returned an error code (1) &quot;的错误

问题描述: 今天在使用命令 "sudo apt-get install python3-pip"安装时,总是出现如下图这样的错误,开始以为是以为自己python版本的问题,后来发现无论装什么东西都会出现,这样的错误,错误展示: 解决方案: 进入如下目录: cd /var/lib/dpkg 删除下面这个文件: sudo mv info info.baksudo 重新创建这个文件: sudo mkdir info 如下图所示: 再次安装: (1)安装pip3: sudo apt-get i

Ubuntu-16.04 部署 OpenStack Ocata&lt;上&gt;

注:本文参照openstack官方文档部署,地址https://docs.openstack.org/.明明才10万字符,硬说超过20万,没办法,分篇. 建议:配置时仔细核对,经多次实验,很多错误都是配置失误造成的. 一.搭建基础环境 192.168.30.145   controller[2vCPU.4G内存.40G存储.双网卡] 192.168.30.146   compute[2vCPU.4G内存.40G存储.双网卡] 1.安装ssh并配置root密码 $ sudo apt install

mariadb install on Ubuntu 16.04.1 LTS

最近在尝试基于Ubuntu 16.04.1 LTS server 部署openstack ,在部署的过程中遇到mariadb 无法正常链接. 问题 参照openstack 官方文档安装mariadb,安装后遇到无法在本地登录的问题 $mysql -u root -p $mysql -h localhost -u root -p 报错如下 mysql (mariadb) ERROR 1698 (28000): Access denied for user 'root'@'localhost' 但使

Ubuntu-16.04 部署 OpenStack Ocata&lt;下&gt;

六.配置 Dashboard 仪表盘服务(Controller Node) 1.配置Dashboard # apt -y install openstack-dashboard # vim /etc/openstack-dashboard/local_settings.py     OPENSTACK_HOST = "192.168.30.145"                 ##配置仪表盘以使用 OpenStack 服务 ALLOWED_HOSTS = ['*']        

openstack项目中遇到的各种问题总结

目录: 一. 从开始到现在遇到的各种问题      1.1.单网卡下搭建openstack出错      1.2.云平台上虚机搭建MDS系统遇到的问题 2         1.2.1.内部网路和外部网络的联通问题 3         1.2.2.windows虚机下对于3D的支持问题 5         1.2.3.对于windows的兼容问题 5     1.3.扩展节点的部分问题 5         1.3.1..扩展节点出错 5         1.3.2.删除扩展节点信息 7     1