Gentoo 常用指令

好像沒有整理一篇常用的指令, 開一篇新的

列出所有和 KDE 相關的套件

$ qlist -I kde

直接升級所有和 kde 相關的套件

$ qlist -IC kde | xargs emerge -u

重裝所有和 x11-drivers 相關的套件

$ emerge $(qlist -IC x11-drivers)

重裝所有和 QT 相關的套件

$ emerge -qa1 $(qlist -IC dev-qt/qt)

重編 xorg-server, 如果那個套件常常當掉, 請記得一定要下這個指令

$ emerge -avDuN xorg-server

重編和 perl 相關的套件 (這個應該適合在很多 perl 套件升級的時候用)

$ perl-cleaner --phupdate --modules

perl 從 5.18 升級 Perl 5.20 時要用的指令, 這個應該是最順的.(perl-5.20.1 – has anybody managed to upgrade Perl?)

emerge -av1O dev-lang/perl
emerge -1 -j4 --keep-going `qlist -IC virtual/perl-`
emerge -1 perl-cleaner

2011/4/22
hal 己經不再使用, 全面改用 udev, 所以

USE="-hal udev"

如果要升級某個特定的套件, 這樣就可以將 perl modules 統統升級.

$ for f in `qlist -IC perl` ; do emerge -u $f ; done

全系統升級

# emerge -tv1 gcc
# emerge -atvuND world

移掉不必要的 package, 有時候怪怪的 dependency 也可以用重編修掉

# emerge --update --newuse --deep --with-bdeps=y @world
# emerge --depclean

e.g.
/usr/lib/gcc/i686-pc-linux-gnu/4.4.6/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lpng14
collect2: ld returned 1 exit status

# lafilefixer --justfixit
find -name \*.la -exec sed -i -e 's/-lpng14/-lpng15/' '{}' \

如果是碰到

XFS: Filesystem sdb7 has duplicate UUID - can't mount

可以參照這篇, 執行命令

# xfs_admin -U generate /dev/md2
Clearing log and setting UUID
writing all SBs
new UUID = 1984d60c-6135-4d4c-8356-d1fc2080dbdc

記得 /etc/fstab 如果是用 UUID mount 的, 也要改一下.

revdep-rebuild 碰到 vmware 的問題
新增一個檔案 /etc/revdep-rebuild/11-vmware
內容是

SEARCH_DIRS_MASK="/usr/lib64/vmware /usr/lib64/vmware-installer"

感覺只是埋起來啊, 不會出問題就算了

 * Checking dynamic linking consistency
[ 87% ]  *   broken /usr/lib64/vmware-installer/2.1.0/lib/libconf/lib/gtk-2.0/2.10.0/loaders/libpixb
ufloader-tiff.so (requires libtiff.so.3)
 *   broken /usr/lib64/vmware-installer/2.1.0/sopython/libpy25.so (requires libpython2.5.so.1.0)
[ 88% ]  *   broken /usr/lib64/vmware/lib/libgksu2.so.0/libgksu2.so.0 (requires libgtop-2.0.so.7
libstartup-notification-1.so.0)
[ 89% ]  *   broken /usr/lib64/vmware/lib/libvmware-gksu.so/libvmware-gksu.so (requires libgksu2.so.
0)
 *   broken /usr/lib64/vmware/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.so (requires l
ibtiff.so.3)
[ 100% ]
 * Generated new 3_broken.rr
 * Assigning files to packages
 *  !!! /usr/lib64/vmware-installer/2.1.0/lib/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tif
f.so not owned by any package is broken !!!
 *   /usr/lib64/vmware-installer/2.1.0/lib/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.s
o -> (none)
 *  !!! /usr/lib64/vmware-installer/2.1.0/sopython/libpy25.so not owned by any package is broken !!!
 *   /usr/lib64/vmware-installer/2.1.0/sopython/libpy25.so -> (none)
 *  !!! /usr/lib64/vmware/lib/libgksu2.so.0/libgksu2.so.0 not owned by any package is broken !!!
 *   /usr/lib64/vmware/lib/libgksu2.so.0/libgksu2.so.0 -> (none)
 *  !!! /usr/lib64/vmware/lib/libvmware-gksu.so/libvmware-gksu.so not owned by any package is broken
 !!!
 *   /usr/lib64/vmware/lib/libvmware-gksu.so/libvmware-gksu.so -> (none)
 *  !!! /usr/lib64/vmware/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.so not owned by an
y package is broken !!!
 *   /usr/lib64/vmware/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.so -> (none)
 * Generated new 4_raw.rr and 4_owners.rr

On this day..

Related Posts

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>