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

時間有限,就記錄這些吧,希望能幫助大家,有些參考別的文章,找不到出處,表示感謝。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM