CentOS7下载与安装错误全记录

这篇文章记录安装CentOS7过程错误全记录,供大家和自己参考

起因:笔记本用的win10系统,开启热点的时候,总是10分钟就自动关闭。于是折腾linux系统,平时用win10系统,也切换到linux系统,当ftp服务器,学习用。

不在虚拟机里面安装,想在真机上学习。

尝试过几个版本,Ubuntu,Debian,最后觉得还是CentOS好用,系统好看,稳定。

一、U盘安装遇到的第一个问题

进不去安装界面,这里是引导出现的问题,根据提示按e编辑引导项目:

当我们在安装选择界面,也就是选择U盘启动的第一个界面,该界面上有三个选项: 
1、Install CentOS 7 
2、Test this media & install CentOS7 
3、Troubleshooting 
此时,按一下Tab键,将会出现在屏幕下方出现这一串文字

vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet

然后将这行文字修改为

vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdb4 quiet

其中sdb4指是我的电脑设备上的U盘,sda指第一个挂载盘,sdb指第二个挂载盘,sdc指第三个挂载盘,依此类推。每台电脑上的USB挂载名称不一样,要视情况而定选择挂载盘。

二、安装过程

分区方案可以自己选,也可以直接系统默认分区,一定要有/boot/efi分区。

我选择的是完全安装,第一次安装成功。

第二次重装的时候,在安装软件的时候,遇到这个问题,Error populating transaction, anaconda is retrying - ...

在其他地方找到答案,摘录过来。

Hi, I’ve tried installing FreePBX (SNG7-FPBX-64bit-1904-2) on two different PC’s but the installation fails to complete, stating “Error populating transaction, anaconda is retrying”. Please let me know if you have any suggestions. Thank you.

Hi
Change your USB Memory Stick or DVD/CD media. you have broken installation media.
Thanks.

That was it! I reburned the DVD and it worked fine. Thank you.

解决方法:U盘安装盘文件损坏了,使用utraISO重新刻录.

三、安装完毕,不能安装grub2,引导,这个问题折腾了我两天,在国外一个论坛找到答案。

 
Doc Text:
The "grub2-mkimage" command fails on UEFI systems by default The "grub2-mkimage" command may fail on UEFI systems with the following error message: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory. This error is caused by a the package _grub2-efi-x64-modules_ package missing from the system. The package is missing due to a known issue where it is not part of the default installation, and it is not marked as a dependency for _grub2-tools_ which provides the "grub2-mkimage" command. The error also causes some other tools which depend on it, such as *ReaR*, to fail. To work around this problem, install the _grub2-efi-x64-modules_, either manually using *Yum*, or by adding it to the Kickstart file used for installing the system.

翻译出来就是:“grub2-mkimage”命令在UEFI系统上失败,默认情况下,“grub2-mkimage”命令在UEFI系统上可能失败,并带有以下错误消息:error: can open ' /usr/lib/grub/x86_64-efi/moddep。lst':没有这样的文件或目录。这个错误是由于系统中缺少了一个包_grub2-efi-x64-modules_包造成的。该包丢失的原因是一个已知的问题,它不是默认安装的一部分,并且没有被标记为_grub2-tools_的依赖项,该依赖项提供了“grub2-mkimage”命令。该错误还会导致其他一些依赖于它的工具(如*ReaR*)失败。要解决这个问题,可以安装_grub2-efi-x64-modules_,可以使用*Yum*手动安装,也可以将其添加到用于安装系统的Kickstart文件中。

解决办法:安装这个包:grub2-efi-x64-modules-2.02-0.80.el7.centos.noarch.rpm

当然,要解决其他依赖问题:

离线安装rpm包自动解决依赖
参照  https://blog.csdn.net/u011396718/article/details/80153515
当生产环境由于安全原因处于断网状态的时候。通过本地源的方式,使用yum能够自动安装软件,并且自动处理好依赖关系。
然而该方法最最关键的一个问题是——怎么获取该软件及其依赖包,供本地源使用?
当安装软件的依赖包较少的话,通过手动的方式,一个个查找并下载,也许是一个可以考虑的方案,而当一个软件有上百个依赖、并且依赖上又有依赖,这时候你再试试?
如果真的觉得很无力,那么downloadonly跟yumdownloade绝对是两个值得尝试的神器。本文主要介绍downloadonly的使用方法。

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
yum install yum-plugin-downloadonly
 
[root@linux-node1 ~]# yum install yum-plugin-downloadonly
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* epel: mirrors.tongji.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.cn99.com
Package yum-3.4.3-158.el7.centos.noarch already installed and latest version
Nothing to do
[root@linux-node1 ~]#
 
 
创建目录用来缓存rpm包
[root@linux-node1 ~]# mkdir /data/rpm -p
[root@linux-node1 ~]#
 
 
我们还可以指定软件包的下载路径。需要加入参数–downloaddir参数。
格式:yum install –downloadonly –downloaddir= your-dir package-name,如:
 
 
执行如下命令
[root@linux-node1 /data/rpms]# yum install --downloadonly --downloaddir=/data/rpm  gem
[root@linux-node1 ~]# cd /data/rpm/
[root@linux-node1 /data/rpm]# ll
total 1012
-rw-r--r-- 1 root root  72560 Mar  5 21:47 ruby-2.0.0.648-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root  84692 Mar  5 21:47 rubygem-bigdecimal-1.2.0-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root  55044 Mar  5 21:47 rubygem-io-console-0.4.2-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root  81180 Mar  5 21:47 rubygem-json-1.7.7-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root  84160 Mar  5 21:48 rubygem-psych-2.0.0-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root 329272 Mar  5 21:48 rubygem-rdoc-4.0.0-33.el7_4.noarch.rpm
-rw-r--r-- 1 root root 224400 Mar  5 21:48 rubygems-2.0.14.1-33.el7_4.noarch.rpm
-rw-r--r-- 1 root root  94056 Mar  5 21:48 ruby-irb-2.0.0.648-33.el7_4.noarch.rpm
[root@linux-node1 /data/rpms]#
 
离线安装本地rpm包
[root@linux-node1 ~]# rsync -a 10.0.3.62:/data/rpm /data/
[root@linux-node1 ~]# cd /data/
[root@linux-node1 /data]# ll
total 4
drwxr-xr-x 2 root root 4096 Aug 20 14:20 rpm
[root@linux-node1 /data]# cd rpm/
[root@linux-node1 /data/rpm]# ll
total 3932
-rw-r--r-- 1 root root   56068 Jan 30  2015 libyaml-0.1.4-11.el7_0.x86_64.rpm
-rw-r--r-- 1 root root   72560 Mar  5 21:47 ruby-2.0.0.648-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root   84692 Mar  5 21:47 rubygem-bigdecimal-1.2.0-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root   55044 Mar  5 21:47 rubygem-io-console-0.4.2-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root   81180 Mar  5 21:47 rubygem-json-1.7.7-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root   84160 Mar  5 21:48 rubygem-psych-2.0.0-33.el7_4.x86_64.rpm
-rw-r--r-- 1 root root  329272 Mar  5 21:48 rubygem-rdoc-4.0.0-33.el7_4.noarch.rpm
-rw-r--r-- 1 root root  224400 Mar  5 21:48 rubygems-2.0.14.1-33.el7_4.noarch.rpm
-rw-r--r-- 1 root root   94056 Mar  5 21:48 ruby-irb-2.0.0.648-33.el7_4.noarch.rpm
-rw-r--r-- 1 root root 2931216 Mar  5 21:48 ruby-libs-2.0.0.648-33.el7_4.x86_64.rpm
[root@linux-node1 /data/rpm]# yum localinstall *.rpm -y

其他问题:

1,CentOS默认源里没有ntfs3g,想要添加ntfs支持,需要自己下载编译安装或者加源yum安装。我这里使用的是添加aliyun的epel源来yum安装的方式。

2,添加epel yum源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3,安装ntfs-3g
yum -y install ntfs-3g

时间有限,就记录这些吧,希望能帮助大家,有些参考别的文章,找不到出处,表示感谢。

posted @ 2019-10-05 12:50  行方思远  阅读(17090)  评论(0编辑  收藏  举报