学习Linux From Scratch的部分总结记录
2013-03-05 10:11
597 查看
学习Linux From Scratch的部分总结记录
今天上午终于解决了最后一个错误,使得LFS终于可以正常启动运行了。前前后后折腾了10来天左右,感觉辛苦,累;但真心有收获,接触了各种诡异的命令,还有各种诡异的系统启动时需要的文件。之前一直在使用debian,学习如何使用linux,真正了解并熟悉这个系统,我想这个--Linux
From Scratch,是不可缺少的。
今天上午的最后一个错误是:在登录时,输入用户名和密码之后,bash提示:cannot execute /bin/bash :No such file or directory错误。在网络google了一下,看了十个八个的网页,终于发现一个博客上也记录到这种错误,不是之前我认为的bash配置错误,而是/etc/passwd文件写错了,在passwd文件第一行:root:x:0:0:root/root:/bin/bash,之后被我添加了一个空格,习惯性的敲完一句后,敲了一个空格。唉,错误的习惯害死人。那行最后是不能有空格的。。。。。
还有之前出现的gpm错误,也是由于/etc/sysconfig/mouse配置文件写错了,出现了MDEVICE无法获取的错误。最后还是删除了那个配置文件,重写了。
最郁闷的一个认知是:linux不是一个系统,是一个内核。要知道,我之前天天嘴巴上喊:“linux系统”,丢大发了都。
几个注意点:
1.得熟悉linux的命令,这样才能区分命令中的数字“1”和字母“l“。太损了........
2.工具链的编译调整,要非常小心,我错了两次,非常细微,汗....
3.编译tcl时出现139错误,就是前期的工具链的错误....
4.最坑人的,小破本上在虚拟机里编译gcc,居然花了3hours还多;在台式机上编译,需要1hours不到,直接就宣判俺的小破本该报废了不是....
5.出现错误,学着利用google去查主题的邮件列表还有相关错误文章,尽管有些是英文的。因为通常我们都不是第一个犯那种错误的人,外国人也一样啊,哈哈!如以下Glibc make 错误:
Hello:
I'm following book version 6.7 on host distribution lfslivecd-x86-6.3-r2145-min running in a VirtualBox VM on a Core2Duo Macbook Pro. I have attempted to not deviate from the book instructions. At this time I cannot easily run the version-check.sh script because
I cannot copy/paste to the VM's console. But, I figure having progressed this far, it's probably OK.
In section 6.9 I encountered an error issuing "make install" for Glibc-2.12.1. It ran for a while then stopped with:
CC="gcc" /usr/bin/perl scripts/test-installation.pl /sources/glibc-build/usr/bin/ldd: line 126: /tmp/test-prg30149: cannot execute binary file
ldd execution failed at scripts/test-installation.pl line 182
make[1]: *** [install] Error 1
In the previous step the tests were all good except for the expected posix/annexc and a couple math tests.
Is this a show-stopper? Any suggestions as to how to proceed?
Thank you.
-Casey
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page
) Casey,
Hmm... it appears that you didn't run one of the commands given in the
book.
QUOTING FROM THE BOOK: Section 6.9
When running *make install*, a script called test-installation.pl performs a
small sanity test on our newly installed Glibc. However, because our
toolchain still points to the /tools directory, the sanity test would be
carried out against the wrong Glibc. We can force the script to check the
Glibc we have just installed with the following:
DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" \
scripts/test-installation.pl
unset DL
今天上午终于解决了最后一个错误,使得LFS终于可以正常启动运行了。前前后后折腾了10来天左右,感觉辛苦,累;但真心有收获,接触了各种诡异的命令,还有各种诡异的系统启动时需要的文件。之前一直在使用debian,学习如何使用linux,真正了解并熟悉这个系统,我想这个--Linux
From Scratch,是不可缺少的。
今天上午的最后一个错误是:在登录时,输入用户名和密码之后,bash提示:cannot execute /bin/bash :No such file or directory错误。在网络google了一下,看了十个八个的网页,终于发现一个博客上也记录到这种错误,不是之前我认为的bash配置错误,而是/etc/passwd文件写错了,在passwd文件第一行:root:x:0:0:root/root:/bin/bash,之后被我添加了一个空格,习惯性的敲完一句后,敲了一个空格。唉,错误的习惯害死人。那行最后是不能有空格的。。。。。
还有之前出现的gpm错误,也是由于/etc/sysconfig/mouse配置文件写错了,出现了MDEVICE无法获取的错误。最后还是删除了那个配置文件,重写了。
最郁闷的一个认知是:linux不是一个系统,是一个内核。要知道,我之前天天嘴巴上喊:“linux系统”,丢大发了都。
几个注意点:
1.得熟悉linux的命令,这样才能区分命令中的数字“1”和字母“l“。太损了........
2.工具链的编译调整,要非常小心,我错了两次,非常细微,汗....
3.编译tcl时出现139错误,就是前期的工具链的错误....
4.最坑人的,小破本上在虚拟机里编译gcc,居然花了3hours还多;在台式机上编译,需要1hours不到,直接就宣判俺的小破本该报废了不是....
5.出现错误,学着利用google去查主题的邮件列表还有相关错误文章,尽管有些是英文的。因为通常我们都不是第一个犯那种错误的人,外国人也一样啊,哈哈!如以下Glibc make 错误:
Hello:
I'm following book version 6.7 on host distribution lfslivecd-x86-6.3-r2145-min running in a VirtualBox VM on a Core2Duo Macbook Pro. I have attempted to not deviate from the book instructions. At this time I cannot easily run the version-check.sh script because
I cannot copy/paste to the VM's console. But, I figure having progressed this far, it's probably OK.
In section 6.9 I encountered an error issuing "make install" for Glibc-2.12.1. It ran for a while then stopped with:
CC="gcc" /usr/bin/perl scripts/test-installation.pl /sources/glibc-build/usr/bin/ldd: line 126: /tmp/test-prg30149: cannot execute binary file
ldd execution failed at scripts/test-installation.pl line 182
make[1]: *** [install] Error 1
In the previous step the tests were all good except for the expected posix/annexc and a couple math tests.
Is this a show-stopper? Any suggestions as to how to proceed?
Thank you.
-Casey
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page
) Casey,
Hmm... it appears that you didn't run one of the commands given in the
book.
QUOTING FROM THE BOOK: Section 6.9
When running *make install*, a script called test-installation.pl performs a
small sanity test on our newly installed Glibc. However, because our
toolchain still points to the /tools directory, the sanity test would be
carried out against the wrong Glibc. We can force the script to check the
Glibc we have just installed with the following:
DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" \
scripts/test-installation.pl
unset DL
相关文章推荐
- LFS-Linux From Scratch学习笔记——LFS系统准备
- LFS(Linux From Scratch)学习
- 新手玩Linux ---- 从Linux From Scratch开始学习Linux (四)
- LFS(Linux From Scratch)学习
- Linux From Scratch--LFS从头开始学习linux
- Linux From Scratch 7.7 玩转记录
- Linux-0.11学习总结——引导启动程序部分
- Linux驱动学习总结转载博客地址记录
- LFS-Linux From Scratch学习笔记——简介与准备工作
- [学习]Linux From Scratch
- 新手玩Linux ---- 从Linux From Scratch开始学习linux(一)
- LFS-Linux From Scratch学习笔记——LFS工具编译命令说明(第二次编译)
- 新手玩Linux ---- 从Linux From Scratch开始学习linux(二)
- LFS-Linux From Scratch学习笔记——构建LFS系统
- linux学习,记录,总结
- 新手玩Linux ---- 从Linux From Scratch开始学习Linux (三)
- 20145234黄斐《信息安全系统设计基础》第六周学习总结(课本部分)
- 今天开始,在此记录学习Linux嵌入式
- linux基础学习-第四天记录
- Linux学习记录--服务