Ubuntu(16.04.2)学习笔记(一)如何解决dpkg: error processing install-info

本文涉及的产品
云数据库 RDS MySQL,集群版 2核4GB 100GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: 一、服务器安装软件是出现以下的错误信息:www@TinywanAliYun:~$ sudo apt-get install letsencryptReading package lists... DoneBuilding dependency tree Reading state information.

一、服务器安装软件是出现以下的错误信息:

www@TinywanAliYun:~$ sudo apt-get install letsencrypt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
letsencrypt is already the newest version (0.17.0-2+ubuntu16.04.1+certbot+1).
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php7.0-mysql (7.0.22-0ubuntu0.16.04.1) ...
dpkg: error processing package php7.0-mysql (--configure):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 php7.0-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

二、具体步骤

1、将info文件夹更名

命令如下:www@TinywanAliYun:~# mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/

2、再新建一个新的info文件夹 

命令如下:www@TinywanAliYun:~# mkdir /var/lib/dpkg/info/

3、更新文件列表:apt-get update

命令如下:www@TinywanAliYun:~# apt-get update

信息如下:       

www@TinywanAliYun:~$ sudo apt update
[sudo] password for www: 
Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease
Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease                                                                 
Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease                                                                
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease 

4、重新安装 

命令如下:www@TinywanAliYun:~# apt-get -f install

信息如下:

www@TinywanAliYun:~$ sudo  apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up php7.0-mysql (7.0.22-0ubuntu0.16.04.1) ...

5、执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下 

命令如下:www@TinywanAliYunu:~# mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/

6、把自己新建的info文件夹删掉 

命令如下:www@TinywanAliYun:~# rm -rf /var/lib/dpkg/info

7、把info_old文件夹重新改回info 

命令如下:www@TinywanAliYun:~# mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info/

8、输入上述命令之后

 在执行 sudo apt-get update 就不会有问题了

9、继续到第一步的安装信息

www@TinywanAliYun:~$ sudo apt-get install letsencrypt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
letsencrypt is already the newest version (0.17.0-2+ubuntu16.04.1+certbot+1).
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.

 10、安装结束

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
8月前
|
Ubuntu Linux
Win10 Ubuntu子系统(内嵌ubuntu18.04)运行32bit Linux原生程序 解决Exec format error错误
Win10 Ubuntu子系统(内嵌ubuntu18.04)运行32bit Linux原生程序 解决Exec format error错误
150 0
|
11月前
|
算法 数据可视化 机器人
ubuntu16.04下ROS操作系统学习笔记(九)Moveit(上)
ubuntu16.04下ROS操作系统学习笔记(九)Moveit(上)
147 0
|
2月前
|
人工智能 Ubuntu 机器人
【ubuntu】手把手教你解决ubuntu报错openssh-server E: Sub-process /usr/bin/dpkg returned an error code (1)
【ubuntu】手把手教你解决ubuntu报错openssh-server E: Sub-process /usr/bin/dpkg returned an error code (1)
201 0
|
11月前
|
机器学习/深度学习 Ubuntu 决策智能
ubuntu16.04 下ROS操作系统学习笔记(一)ROS-kinetic安装
ubuntu16.04 下ROS操作系统学习笔记(一)ROS-kinetic安装
109 0
|
Ubuntu 网络协议 网络安全
i.mx287学习笔记-ubuntu虚拟机网络配置同时连接WIFI上外网和连接以太网与i.mx287开发板通信
在学习ARM嵌入式开发过程中,需要在ubuntu虚拟机下进行程序开发和编译,一般需要使用网线直连ARM开发板,或挂载NFS网络文件系统,或通过SSH 、TFTP等网络协议传输在PC端编译完的二进制文件,另一方面又需要使用ubuntu虚拟机连接外网,用来下载一些依赖包或者工具链等,本文介绍一种方法,使得ubuntu虚拟机既可以连接WIFI上外网,又可以连接ARM开发板进行其嵌入式开发。
167 0
|
Ubuntu 机器人 虚拟化
ROS学习笔记(一) ubuntu和ros的安装
ROS学习笔记(一) ubuntu和ros的安装
|
Ubuntu JavaScript
ubuntu 文件监视数量 Error: ENOSPC: System limit for number of file watchers reached, watch‘所在文件路径‘
vue 运行执行 npm run dev | * Error: ENOSPC: System limit for number of file watchers reached, watch’所在文件路径’ 最简单的命令 沾走就能用
173 0
ubuntu 文件监视数量 Error: ENOSPC: System limit for number of file watchers reached, watch‘所在文件路径‘
|
Ubuntu Linux 数据安全/隐私保护
Ubuntu远程连接显示错误Network error Connection refused解决方法
Ubuntu远程连接显示错误Network error Connection refused解决方法
475 0
Ubuntu远程连接显示错误Network error Connection refused解决方法
|
并行计算 Ubuntu 异构计算
成功解决Ubuntu下的include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory
成功解决Ubuntu下的include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory
成功解决Ubuntu下的include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory