关于Portage的若干常用命令:
emerge --fetchonly package_name //只下载包文件
emerge --info //查看portage的配置信息,包括use内容,显卡,声卡等配置
eselect profile list //查看系统可选配置
eselect profile set number //设置系统的配置
emerge pciutils //安装该包,可以用lspci命令查看硬件信息
/usr/portage/distfiles //该目录下含有emerge过程中下载的所有安装包
这次装的时候细心了很多。首先eselect profile set 3(设置成开发环境),然后使用emerge --info 查看了一些配置信息。有很多字段开始不认识
如ALSA_CARDS,ALSA_PCM_PLUGINS,还有很多字段内容太多光USE一项就已经眼花了,还有video_cards那项配对显卡太多了(这个还是在之前配置xorg-server学到的),而且input_devices选项多(因为在使用图形化界面的时候只使用到了evdev一项),又想了想本身又不想用KDE,就在/etc/make.conf中加了USE="-bluetooth -kde -qt3 -qt4 -ipv6"。这一折腾把基本上没用的都删掉了,先这样,慢慢细化。
还有ALSA_CARDS,goole了一些资料,好像是声卡驱动。lspci查看我的声卡驱动显示
Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (虚拟机上的),找了找ALSA_CARDS里边的内容,也没有符合的。正在寻找中。。。。。可算找到个不错的资料,非常感谢这位撰写者,ALSA驱动声卡流程详解 。
真奇怪了,莫名其妙选了profile 3作为portage的默认配置(eselect profile set 3 开发者环境,之前要么就没设置,要么就使用的2,也就是桌面环境),可当我驾轻就熟的使用emerge syslog-ng的时候,意外发生了Failed to emerge dev-libs/glib-2.20.5-r1。不相信事实也得相信啊,因为事实已经摆在你的面前。我又重新emerge了三回,还是不行。看问题的错误报告似乎是哪个包没有倒进来或者是哪个选项没有选。
错误提示:
Part1:
* The FEATURES=digest setting can prevent corruption from being noticed.
* The `repoman manifest` command is the preferred way to generate
* manifests and it is capable of doing an entire repository or category at once.
Part2:
>>> Failed to emerge dev-libs/glib-2.20.5-r1, Log file:
>>> '/var/tmp/portage/dev-libs/glib-2.20.5-r1/temp/build.log'
* Messages for package dev-libs/glib-2.20.5-r1:
*
* ERROR: dev-libs/glib-2.20.5-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_test
* environment, line 3051: Called die
* The specific snippet of code:
* emake check || die "tests failed"
* The die message:
* tests failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/dev-libs/glib-2.20.5-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-libs/glib-2.20.5-r1/temp/environment'.
*
看上面那两个报告要么FEATURES有错,要么是USE有错。想起之前用2模式和默认的时候都没错过,使用eselect profile set 2调回桌面模式,居然可以用了。现在就开始对比两个的emerge --info有什么区别,用pscp把它们的信息导回到windows来做下对比,果然差别好大,先把区别列出来待以后参考:
desktop:
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 jpeg ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vmware"