云核算平台OpenStack装置相关问题

apt常用指令:


# apt-get 系列=========================================
apt-get update # 更新装置列表
apt-get upgrade # 晋级软件
apt-get install software_name # 装置软件
apt-get --purge remove  software_name # 卸载软件及其装备 
apt-get autoremove software_name # 卸载软件及其依赖的装置包
apt-get install software-properties-common #装置常用软件包
apt-get update && apt-get dist-upgrade  #主机上晋级包
apt-get install python-openstackclient  # 装置 OpenStack 客户端
apt-get install mariadb-server python-pymysql # 装置sql软件包
sudo apt-get remove --purge mysql-server mysql-client mysql-common # 卸载软件
sudo apt-get autoremove #主动删去
sudo apt-get autoclean #主动整理
sudo apt-get install mariadb-server #重装软件
# dpkg系列=============================================
dpkg --list # 展示已装置软件
dpkg -i package.deb  #装置/更新一个 deb 包
dpkg -r package_name  #从体系删去一个 deb 包
dpkg -l  #显现体系中所有现已装置的 deb 包
dpkg -l | grep httpd  #显现所有称号中包括 "httpd" 字样的deb包
dpkg -s package_name  #取得现已装置在体系中一个特别包的信息
dpkg -L package_name  #显现体系中现已装置的一个deb包所供给的文件列表
dpkg --contents package.deb  #显现没有装置的一个包所供给的文件列表
dpkg -S /bin/ping  #确认所给的文件由哪个deb包供给
# sudo系列=============================================
sudo su # 切换到管理员身份
sudo dpkg -i /tmp/mozilla_feng0/apt_1.6.12ubuntu0.2_amd64.deb #管理员身份装置该软件包
# 其它=======================================
cd /etc/apt
#备份一下 cp sources.list sources.list_bak
# rm sources.list # 删去指定途径文件,切忌运用rm -f

1、ping不通百度

过错描绘:无法ping通百度

过错原因:本地主机未衔接网络

处理办法:将本地主机衔接网络。

2,没有装置权限

问题描绘:

E: Could not get lock /var/lib/dpkg/lock-frontend – open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

原因:上锁了,没有权限

云计算平台OpenStack安装相关问题

处理办法:

删去这两个文件

sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

云计算平台OpenStack安装相关问题

3、Unable to locate package chorny

问题描绘:Unable to locate package chorny

云计算平台OpenStack安装相关问题

问题原因:未在install之前进行软件源更新。

处理办法:在sudo apt-get install 之前更新软件源,即履行sudo apt-get update

云计算平台OpenStack安装相关问题

4、controller虚拟机无法与compute虚拟机进行通信,ping不同。

问题描绘:虚拟机相互之间无法ping通。

问题原因:IP过错,未在同一局域网内。

处理办法:从头设置IP为同一局域网。

5、Unable to locate package software-propert

问题描绘:Unable to locate package software-propert

问题原因:要对apt-get、及奥普特进行更新

处理办法:

apt-get update
apt-get install python-software-properties
apt-get install apt-file
apt-file update
apt-get install software-properties-common
apt-get install vim 

6、cloud-archive for Mitaka only supported on trusty

问题描绘:cloud-archive for Mitaka only supported on trusty

问题原因:不支持???

云计算平台OpenStack安装相关问题

处理办法:

1、履行指令 apt-get update && apt-get dist-upgrade,履行完成后重启体系 2、履行指令 apt-get install python-openstackclient

云计算平台OpenStack安装相关问题

7、Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)

E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

过错描绘:Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

过错原因:有进程占用

处理办法:

1、杀死所有进程并从头发动该服务。

2、直接经过指令删去该锁文件

sudo rm /var/lib/dpkg/lock

8、Ubantu下载过慢!

问题描绘:Ubantu下载过慢!!!

问题原因:Ubantu镜像源是默许的镜像源,国外服务器拜访下载速度太慢

处理办法:

1、备份原有

cp /etc/apt/sources.list /etc/apt/sources.list.old

2、修正装备文件 途径:/etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

9、Unable to locate package mariadb-server

E: Unable to locate package python-pymysql

问题描绘:

运行指令 apt-get install mariadb-server python-pymysql 呈现以下过错:

Unable to locate package mariadb-server E: Unable to locate package python-pymysql

问题原因:没有下载装置包,经过以下指令进行软件装置包晋级再进行装置

apt-get update && apt-get dist-upgrade

10、Unable to correct problems, you have held broken packages.

问题描绘:运行指令 apt-get install mariadb-server python-pymysql 呈现以下过错:

Unable to correct problems, you have held broken packages.

问题原因:下载的包有丢失或损坏

处理办法:需求从头强制下载,要找到该包,再下载。

11、apt-get command not found

问题描绘:apt-get command not found,无法运用apt-get进行下载装置

问题原因:apt-get被误删了,所以找不到apt-get指令

处理办法:由于也没有装置yum及其他装置软件,因此只能手动到镜像源去下载apt压缩包,解压后运用apt装置apt-get.

处理过程:

  1. 首先去ubuntu官方下载apt包 packages.ubuntu.com/search?suit… 下载时注意你自己的CPU的架构以及是32位仍是64位。

    阿里云Ubantu镜像apt软件包地址:mirrors.aliyun.com/ubuntu/pool… 。

  2. 解压相关文件,装置,然后用apt 来装apt-get(这步有其他相关文档能够收索,就不写了)

  3. 修正sources.list 去阿里官方镜像developer.aliyun.com/mirror/ubun… update就有飞一样的速度咯

  4. apt-get update更新软件源 完事后你就能够apt-get install了

云计算平台OpenStack安装相关问题

12、Unmet dependencies. Try ‘apt –fix-broken install’ with no packages (or specify a solution).

过错描绘:装置软件呈现以下过错提示。

@feng# sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apt : Depends: libapt-pkg5.0 (>= 1.6.12ubuntu0.2) but 1.6.8 is to be installed
 aptitude : Depends: aptitude-common (= 0.8.10-6ubuntu1) but 0.7.4-2ubuntu2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

过错原因:有破损的包存在,无法进行装置。

处理办法:运行 apt –fix-broken install 进行补全装置。

云计算平台OpenStack安装相关问题

sql软件包及之前内容环境建立完毕

云计算平台OpenStack安装相关问题

13、Failed to start MariaDB 10.1.47 database lines 1-17/17 (END)

过错描绘:

mariadb.service: Main process exited, co
Dec 21 05:28:59 controller systemd[1]: mariadb.service: Failed with result 'exi
Dec 21 05:28:59 controller systemd[1]: Failed to start MariaDB 10.1.47 database
lines 1-17/17 (END)

云计算平台OpenStack安装相关问题

过错原因:装置过错!

处理办法:从头装置!!

14、Ubantu装置MariaDB时呈现依赖性过错,无法装置。

过错描绘:

dpkg: error processing package mariadb-server-10.1 (--configure):
 installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (>= 1:10.1.47-0ubuntu0.18.04.1); however:
  Package mariadb-server-10.1 is not configured yet.
dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-21) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                           Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for systemd (237-3ubuntu10.43) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

过错原因:暂不清晰

处理办法:

测验的方法:

#卸载清楚之后从头装置
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server
sudo apt-get --yes autoremove --purge mysql-server
sudo apt-get --yes autoremove --purge mysql-client
sudo apt-get --yes autoremove --purge mysql-common
sudo rm -rf /var/lib/mysql /etc/mysql ~/.mysql
sudo dpkg --configure -a

终究处理方案:

sudo rm /var/lib/mysql/ -R
sudo rm /etc/mysql/ -R
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor #这一步选Yes
sudo apt-get install mysql-server mysql-common #从头输入暗码

15、Ubantu发动mysql报错

过错描绘:Ubantu发动mysql报错,

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

过错原因:未发动mysql服务.

处理办法:经过下面指令行发动服务

service mysql start

16、error processing package mariadb-server-10.1 (–configure):

过错描绘:

error processing package mariadb-server-10.1 (--configure):
installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (>= 1:10.1.47-0ubuntu0.18.04.1); however:
  Package mariadb-server-10.1 is not configured yet.
dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                           Processing triggers for libc-bin (2.27-3ubuntu1.4) 

云计算平台OpenStack安装相关问题

过错原因:

不明原因,可能装置过错或其它过错原因!!(具体尚不清晰!)

处理办法:

sudo rm /var/lib/mysql/ -R
sudo rm /etc/mysql/ -R
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor #这一步选Yes
sudo apt-get install mysql-server mysql-common #从头输入暗码

云计算平台OpenStack安装相关问题

云计算平台OpenStack安装相关问题

17、数据库连不上,经过mysql无法衔接数据

过错描绘:数据库衔接不上,无法经过mysql指令行进行拜访数据

云计算平台OpenStack安装相关问题

过错原因:直接拜访没有数据库登录权限,root权限用户暗码不知道。(搞忘了)

处理办法:经过以下方法进行处理。

service mysql stop //中止mysql服务
mysqld_safe --skip-grant-tables & //过滤权限
mysql //进入mysql指令行形式
mysql> use mysql;//切换database
mysql> UPDATE user SET password=password("test123") WHERE user='root';  //更改root用户暗码
mysql> exit;  //退出mysql指令行形式

云计算平台OpenStack安装相关问题
上面是可能遇到的过错,或许有些过错并未呈现,后续会持续更新过错。