好像沒有整理一篇常用的指令, 開一篇新的
Table of Contents
KDE/QT 相關
列出所有和 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)
當有 block 時如何升級 KDE 相關套件
目前我自己試出來最好用的指令
# emerge -1 --keep-going `qlist -IC kde-frameworks kde-plasma`
重編 xorg-server
Qt/FAQ Why do I get blockers when trying to emerge Qt?
不打包備份的指令,如果要打包請參照以上的連結
# export INSTALLED_QT_PACKAGES=$(qlist -IC "dev-qt/*") # emerge -Ca ${INSTALLED_QT_PACKAGES} && emerge -av1 ${INSTALLED_QT_PACKAGES}
如果那個套件常常當掉, 請記得一定要下這個指令
$ emerge -avDuN xorg-server
一般
全系統升級
全系統升級指令,三不五時常用保健康(?)
emerge --update --newuse --deep --with-bdeps=y @world # 如果中間碰到問題,要繼續 emerge 下去,加上--keep-going=y $ emerge --update --newuse --deep --with-bdeps=y --keep-going=y @world
例如升級 Gcc 之後
$ emerge -tv1 gcc
$ emerge -atvuND world
移掉不必要的 package
有時候怪怪的 dependency 也可以用重編修掉
# emerge --depclean
重編和 perl 相關的套件
重編和 perl 相關的套件 (這個應該適合在很多 perl 套件升級的時候用)
$ perl-cleaner --phupdate --modules$ perl-cleaner --all
Perl 升級
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
Perl Blocks
root # emerge -uDNav --with-bdeps=y --backtrack=100 --autounmask-keep-masks=y @world root # perl-cleaner --all
ref.
TL;DR: Blockers
找不到 Library
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 的, 也要改一下.
常用指令
查詢編譯時間
$ qlop -t package
# qlop -t llvm 2021-07-01T02:47:45 >>> sys-devel/llvm: 25′00″ 2021-07-01T10:37:28 <<< sys-devel/llvm: 2s 2021-09-30T22:54:53 >>> sys-devel/llvm: 22′35″ 2021-10-01T08:16:56 >>> sys-devel/llvm: 24′44″ 2021-10-08T08:55:06 >>> sys-devel/llvm: 25′32″
查詢系統有多少 Package 依賴某個版本的某 Package
# emerge -pvc llvm:13 Calculating dependencies... done! sys-devel/llvm-13.0.0 pulled in by: dev-lang/spidermonkey-78.15.0 requires sys-devel/llvm:13 media-libs/mesa-21.3.0 requires <sys-devel/llvm-14:13/13=, <sys-devel/llvm-14:=, sys-devel/llvm:13 sys-devel/clang-13.0.0 requires ~sys-devel/llvm-13.0.0[llvm_targets_BPF], ~sys-devel/llvm-13.0.0:13/13=[-debug], ~sys-devel/llvm-13.0.0[llvm_targets_AArch64], ~sys-devel/llvm-13.0.0:13=[-debug] sys-devel/lld-13.0.0 requires ~sys-devel/llvm-13.0.0 sys-devel/llvmgold-13-r1 requires sys-devel/llvm:13[gold(-)] sys-libs/compiler-rt-13.0.0 requires >=sys-devel/llvm-6 sys-libs/compiler-rt-sanitizers-13.0.0 requires >=sys-devel/llvm-6 www-client/firefox-94.0.2 requires sys-devel/llvm:13 >>> No packages selected for removal by depclean Packages installed: 884 Packages in world: 65 Packages in system: 43 Required packages: 884 Number to remove: 0
neofetch
這個還頗常用的,但是常常忘記的指令
碰到的怪問題
masked by: EAPI 8
!!! All ebuilds that could satisfy "dev-perl/Locale-Maketext-Lexicon" have been masked. !!! One of the following masked packages is required to complete your request: - dev-perl/Locale-Maketext-Lexicon-1.0.0-r1::gentoo (masked by: EAPI 8)
這個是沒有升級 portage ,升級一下就好了
# emerge -a1O portage
系統設定
Gentoo default password rule 太機車
修改 /etc/security/passwdqc.conf 將 min= 改成 min=1,1,1,1,1
ref.
Gentoo Very Big Password Requirements
Compile dev-qt/qtwebengine 的問題
當 compile dev-qt/qtwebengine 時,如果你的系統有很多 CPU cores ,底層用的 ninja 似乎就會出問題,應該是這個檔案太大,所以 cache 太多資料,唯一的解決方法是減少 CPU Cores
我自己的經驗是,如果在較舊(慢)的電腦 CPU 可以多一點,如果是新的電腦 CPU 要少一點
有幾個方法可以用 chcpu –disable <CPU cores> 簡單暴力,但是只適合單一測試使用,如果要長久設定,可以用 portage.env 的方式設定,ex:
echo "dev-qt/qtwebengine lowcpu.conf" >> /etc/portage/package.env
echo "MAKEOPTS=\"-j4\"" > /etc/portage/env/lowcpu.conf
這樣在編 qtwebengine 時就會使用 MAKEOPTS=”-j4″ 的命令了
ref
[SOLVED] emerging qtwebengine-5.7.1
Expired (備份用)
如果要升級某個特定的套件, 這樣就可以將 perl modules 統統升級.
$ for f in `qlist -IC perl` ; do emerge -u $f ; done
2011/4/22
hal 己經不再使用, 全面改用 udev, 所以
USE="-hal udev"
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
發佈留言