gentoo安裝的點點滴滴(六)

1. 升級了下內核,wireshark出問題了,直接打開不能發現網卡,要sudo才能打開。在普通用戶下直接用wireshark的方法可以參照http://blog.csdn.net/u011500307/article/details/13506763。是因爲這次升級內核刪除了Filesystem Capabilities這個特性導致的,具體的原因可以見:http://packetlife.net/blog/2010/mar/19/sniffing-wireshark-non-root-user/。下面是內核的配置:



2. 在xfce下的Qt程序的界面都比較不友好,選擇了默認的桌面主題,但是就是和桌面的主題不同。後來google搜xfce gtk qt 和gentoo gtk qt可以找到下面的解決方法(https://wiki.gentoo.org/wiki/GTK%2B_themes_in_Qt_applications),從wiki上可以得到:

The GTK+ style for Qt can be built by setting the gtkstyle USE flag for dev-qt/qtgui.

Set the gtkstyle USE flag. If there is a blocker, unset the qt4 flag in x11-libs/cairo:

 [Collapse
File/etc/portage/package.use

dev-qt/qtgui gtkstyle
x11-libs/cairo -qt4

and rebuild the packages with their new USE flags:

root # emerge --ask --changed-use qtgui cairo
主要就是安裝qtgui的時候要加上gtkstyle這個use標記。還有就是64位的系統下運行32位的Qt程序要 app-emulation/emul-linux-x86-qtlibs加上gtkstyle重新編譯下。

編譯完成後打開qtconfig,選擇GTK+主題就可以了,如果不行的話,多換幾下主題,再換回去。我就遇到這個奇怪的問題,本來都安裝好了,就是沒有實現gtk界面,後來多換的幾次主題後就好了。

3. 由於精簡的了內核,aircrack啓動的時候就是找不到網卡,在https://forums.gentoo.org/viewtopic-t-841814-start-0.html,這裏找到答案了。

For legacy software that still uses wireless extensions you have to enable nl80211 wext compatibility.

代碼:
CONFIG_CFG80211_WEXT=y
But I think aircrack-ng supports nl80211 at least as long as net-wireless/iw is installed

在內核menu中找到這項,並編譯就好了。

-*- Networking support  --->
	-*-   Wireless  ---> 
		 <*>   cfg80211 - wireless configuration API 	
		 	[*]     cfg80211 wireless extensions compatibility  


4. 安裝gentoo這麼久了,纔想起自己的華碩n45上有media keys沒有用啊,先用showkey來識別,沒有反應。內核的相應的驅動沒有裝,內核模塊如下:

Bus options (PCI etc.)  --->
    <*> Support for PCI Hotplug  --->
         [*]   ACPI PCI Hotplug driver

 Device Drivers  ---> 
    [*] X86 Platform Specific Device Drivers  --->
        <M>   ASUS WMI Driver                                                                             
        <M>     Asus Notebook WMI Driver                                                             
        <*>   WMI 

上面的ASUS WMI Driver依賴於其它幾個選項,只有其它幾個選上了,纔會出現這個選項。 編譯完成後就可以識別media keys了,現在來實現notify。安裝xfce4-notifyd,可以實現右上角的半透明的通知。

再裝上xfce4-volumed,當用media key來調節音量的時候會彈出相應的通知窗口,隨聲音的變化而變化。上個截圖吧:



5. 最近安裝的qt程序都出問題了,再安裝qt程序也出現下面的錯誤:

beyond@beyond ~ $ sudo emerge -av goldendict 
密碼: 

 * IMPORTANT: 1 news items need reading for repository 'gentoo-zh'. 
 * IMPORTANT: 6 news items need reading for repository 'gentoo'. 
 * Use eselect news to read news items. 


These are the packages that would be merged, in order: 

Calculating dependencies... done! 
[ebuild   R    ] app-text/goldendict-1.0.1  USE="-debug -kde" LINGUAS="-ar_SA -bg_BG -cs_CZ -de_DE -el_GR -it_IT -lt_LT -ru_RU -uk_UA -vi_VN -zh_CN" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB 

Would you like to merge these packages? [Yes/No] yes 

>>> Verifying ebuild manifests 

>>> Emerging (1 of 1) app-text/goldendict-1.0.1 
 * goldendict-1.0.1-src.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...     [ ok ] 
>>> Unpacking source... 
>>> Unpacking goldendict-1.0.1-src.tar.bz2 to /var/tmp/portage/app-text/goldendict-1.0.1/work 
>>> Source unpacked in /var/tmp/portage/app-text/goldendict-1.0.1/work 
>>> Preparing source in /var/tmp/portage/app-text/goldendict-1.0.1/work ... 
 * Applying goldendict-1.0.1-gcc-4.7.patch ...                           [ ok ] 
>>> Source prepared. 
>>> Configuring source in /var/tmp/portage/app-text/goldendict-1.0.1/work ... 
 * Running qmake ... 
QMAKESPEC has not been set, so configuration cannot be deduced. 
Error processing project file: goldendict.pro                            [ !! ] 

 * Running qmake has failed! (see above for details) 
 * This shouldn't happen - please send a bug report to https://bugs.gentoo.org/ 

 * ERROR: app-text/goldendict-1.0.1::gentoo failed (configure phase): 
 *   eqmake4 failed 
 * 
 * Call stack: 
 *     ebuild.sh, line   93:  Called src_configure 
 *   environment, line 2232:  Called eqmake4 
 *   environment, line  973:  Called die 
 * The specific snippet of code: 
 *           die "eqmake4 failed"; 
 * 
 * If you need support, post the output of `emerge --info '=app-text/goldendict-1.0.1::gentoo'`, 
 * the complete build log and the output of `emerge -pqv '=app-text/goldendict-1.0.1::gentoo'`. 
 * The complete build log is located at '/var/tmp/portage/app-text/goldendict-1.0.1/temp/build.log'. 
 * The ebuild environment file is located at '/var/tmp/portage/app-text/goldendict-1.0.1/temp/environment'. 
 * Working directory: '/var/tmp/portage/app-text/goldendict-1.0.1/work' 
 * S: '/var/tmp/portage/app-text/goldendict-1.0.1/work' 

>>> Failed to emerge app-text/goldendict-1.0.1, Log file: 

>>>  '/var/tmp/portage/app-text/goldendict-1.0.1/temp/build.log' 

 * Messages for package app-text/goldendict-1.0.1: 

 * Running qmake has failed! (see above for details) 
 * This shouldn't happen - please send a bug report to https://bugs.gentoo.org/ 
 * ERROR: app-text/goldendict-1.0.1::gentoo failed (configure phase): 
 *   eqmake4 failed 
 * 
 * Call stack: 
 *     ebuild.sh, line   93:  Called src_configure 
 *   environment, line 2232:  Called eqmake4 
 *   environment, line  973:  Called die 
 * The specific snippet of code: 
 *           die "eqmake4 failed"; 
 * 
 * If you need support, post the output of `emerge --info '=app-text/goldendict-1.0.1::gentoo'`, 
 * the complete build log and the output of `emerge -pqv '=app-text/goldendict-1.0.1::gentoo'`. 
 * The complete build log is located at '/var/tmp/portage/app-text/goldendict-1.0.1/temp/build.log'. 
 * The ebuild environment file is located at '/var/tmp/portage/app-text/goldendict-1.0.1/temp/environment'. 
 * Working directory: '/var/tmp/portage/app-text/goldendict-1.0.1/work' 
 * S: '/var/tmp/portage/app-text/goldendict-1.0.1/work' 

錯誤就是
QMAKESPEC has not been set, so configuration cannot be deduced. 
Error processing project file: goldendict.pro                            [ !! ] 


然後再網上搜索原因說是沒有設置QMAKESPEC,用qmake -query查看了下:

beyond@beyond ~ $ qmake -query 
QMAKESPEC://mkspecs 
QT_INSTALL_PREFIX:/ 
QT_INSTALL_DATA:/ 
QT_INSTALL_DOCS:/doc 
QT_INSTALL_HEADERS:/include 
QT_INSTALL_LIBS:/lib 
QT_INSTALL_BINS:/bin 
QT_INSTALL_PLUGINS:/fonts 
QT_INSTALL_IMPORTS:/imports 
QT_INSTALL_TRANSLATIONS:/translations 
QT_INSTALL_CONFIGURATION:/ 
QT_INSTALL_EXAMPLES:/ 
QT_INSTALL_DEMOS:/ 
QMAKE_MKSPECS://mkspecs 
QMAKE_VERSION:2.01a 
QT_VERSION:4.8.5 

在gentoo論壇上提問,別人給出他的正確的是:

acoswt@PrimaPratica ~ $ qmake -query 
QT_INSTALL_PREFIX:/usr 
QT_INSTALL_DATA:/usr/share/qt4 
QT_INSTALL_DOCS:/usr/share/doc/qt-4.8.5 
QT_INSTALL_HEADERS:/usr/include/qt4 
QT_INSTALL_LIBS:/usr/lib64/qt4 
QT_INSTALL_BINS:/usr/bin 
QT_INSTALL_PLUGINS:/usr/lib64/qt4/plugins 
QT_INSTALL_IMPORTS:/usr/lib64/qt4/imports 
QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations 
QT_INSTALL_CONFIGURATION:/etc/qt4 
QT_INSTALL_EXAMPLES:/usr/share/qt4/examples 
QT_INSTALL_DEMOS:/usr/share/qt4/demos 
QMAKE_MKSPECS:/usr/share/qt4/mkspecs 
QMAKE_VERSION:2.01a 
QT_VERSION:4.8.5

從上面可以看出應該是路徑問題了,可是網上說直接export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++ ,就可以了,我試了好多次都有問題。看來還是要找其它的原因了。

想想就直接locate qt.conf

beyond@beyond ~ $ locate qt.conf
/usr/bin/qt.conf
/usr/portage/games-roguelike/slashem/files/0.0.7E7/qt.configure

真正的問題就出在qt.conf,qmake的路徑從這裏加載的,所以都出錯了。想想是安裝115的軟件的時候直接複製這個文件到/usr/bin的,直接刪除這個文件,就一切正常了,不過115不能用了。反正不怎麼用,就直接也把115也刪除了。

6. 最近全面升級了系統,命令如下:

# emerge --update --deep --newuse world
# emerge --depclean
# revdep-rebuild

7. 升級完後還有一些問題的,fcitx沒有五筆了,原來是要加use=table,就可以了。直接在 /etc/portage/package.use加上:

 app-i18n/fcitx table

8. 編譯新內核後要生成相應的grub2啓動項配置。用下面的命令:

beyond@beyond / $ sudo grub2-mkconfig -o /boot/grub/grub.cfg 
密碼:
Generating grub.cfg ...
Found linux image: /boot/kernel-genkernel-x86_64-3.12.20-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.12.20-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.12.13-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.12.13-gentoo
Found linux image: /boot/kernel-genkernel-x86_64-3.10.25-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-3.10.25-gentoo
done

9. 安裝firefox-bin與thunderbird-bin的時候會自動用英文編譯,可以選擇相應的語言。我肯定是選簡體中文了。

方法一:

beyond@beyond ~ $ sudo LINGUAS="zh_CN" emerge -av thunderbird-bin
這種方法就是一次性的,下次編譯的時候還要寫上LINGUAS="zh_CN"


方法二:在/etc/portage/make.conf中加上

LINGUAS="zh_CN en"
這樣編譯軟件只要支持中文都會以中文編譯,這個是全局性質的


方法三:介紹個局部性質的,直接在/etc/portage/package.use中加上

mail-client/thunderbird-bin linguas_zh_CN
這樣只會針對thunderbird-bin,其它的軟件不會


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章