Opensuse

如何在 SUSE 中安裝 src 包?

  • January 15, 2017

我使用zypper si命令在 SUSE 中安裝源包:

localhost:/dev/disk/by-id # zypper si zlib
Reading installed packages...
Loading repository data...
Resolving package dependencies...

The following source package is going to be installed:
 zlib

1 source package to install.
Overall download size: 587.0 KiB. Already cached: 0 B. After the operation, additional 597.7 KiB will be used.
Continue? [y/n/? shows all options] (y): y
Checking for file conflicts: ........................................................................................................[done]

但是當我使用命令:zypper se檢查包狀態時,它顯示“未安裝”:

localhost:/dev/disk/by-id # zypper se zlib
Loading repository data...
Reading installed packages...

S | Name | Summary                  | Type
--+------+--------------------------+-----------
 | zlib | Data Compression Library | srcpackage

誰能提供一些線索?

實際上,源包已經成功安裝在/usr/src/package文件夾中。但本文件installed中並未將其標記為“ ”狀態:

提示:可以將源包從安裝介質複製到硬碟並使用 YaST 解壓。但是,它們沒有標記為已安裝 (

$$ i $$) 在包管理器中。這是因為源包沒有輸入到 RPM 數據庫中。RPM 數據庫中僅列出已安裝的作業系統軟體。安裝源包時,只會將原始碼添加到系統中。

引用自:https://unix.stackexchange.com/questions/231206