一開終端機就跑出這個錯誤

Error: Cannot find a valid baseurl for repo: extras

後來查了一下似乎是因為連結的網站搬移了 所以無法下載也無法更新

http://chunwen.wordpress.com/2010/04/03/yum-error-cannot-find-a-valid-baseurl-for-repo-extras/

似乎有的人錯誤訊息不是extras 而是core 或update 上面的連結有修正方法

至於錯誤和我一樣是 Error: Cannot find a valid baseurl for repo: extras

請修改/etc/yum.repos.d/

內的fedora-extras.repo檔

內容改成


[extras]
name=Fedora Extras $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-$releasever&arch=$basearch
baseurl=http://ftp.uni-bayreuth.de/linu.xtras/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
gpgcheck=1

紅色字的部分是新加的

這樣就可以順利更新了

編譯部分和ubuntu很像 只是改成用yum

在編譯之前請裝好 gcc 和 ncurses-devel

yum install gcc (忘記在哪個步驟會出錯了)

yum install ncurses-devel (若沒裝 則make menuconfig會有問題 錯誤訊息在vm內 懶的copy了)

安裝步驟下面的網址有教學

http://www.howtoforge.com/kernel_compilation_fedora_p2

怕他又在次消失我還是備份一下

3.1 Download The Kernel Sources

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.1.tar.bz2

tar xjf linux-2.6.18.1.tar.bz2
ln -s linux-2.6.18.1 linux
cd /usr/src/linux

3.3 Configure The Kernel

It's a good idea to use the configuration of your current working kernel as a basis for your new kernel. Therefore we copy the existing configuration to/usr/src/linux:

 

make mrproper <-做這個動作時 請在linux所在目錄下做 否則會有no rule的錯誤出現
cp /boot/config-`uname -r` ./.config

Then we run

make menuconfig <-做這個動作時 請在linux所在目錄下做 否則會有no rule的錯誤出現

which brings up the kernel configuration menu. Go to Load an Alternate Configuration File and choose .config (which contains the configuration of your current working kernel) as the configuration file:


Then browse through the kernel configuration menu and make your choices. When you are finished and select Exit, answer the following question (Do you wish to save your new kernel configuration?) with Yes:

圖和前一篇是一樣的

3.4 Build And Install The Kernel

To build and install the kernel, execute these three commands:

make all(或是make)
make modules_install
make install

uname -r

This should display something like

2.6.18.1

make 完之後應該要出現像下面的訊息 若沒有 請再make一次

1.jpg

make modules_install 之後應該出現的訊息

2.jpg 


最後一提 一般來說 如果要對kernel做更改 請找usr/src/linux-2.6.18.1 下面的做更改 不要理linux這個目錄

arrow
arrow
    全站熱搜

    a22710518 發表在 痞客邦 留言(1) 人氣()