| 使用 zypper命令附带lr或repos子命令列出仓库。 root@kerneltalks # zypper lrRefreshing service 'cloud_update'.Repository priorities are without effect. All enabled repositories share the same priority. #  | Alias                                                                                | Name                                                  | Enabled | GPG Check | Refresh---|--------------------------------------------------------------------------------------|-------------------------------------------------------|---------|-----------|-------- 1 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Adv-Systems-Management12-Debuginfo-Pool    | SLE-Module-Adv-Systems-Management12-Debuginfo-Pool    | No      | ----      | ---- 2 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Adv-Systems-Management12-Debuginfo-Updates | SLE-Module-Adv-Systems-Management12-Debuginfo-Updates | No      | ----      | ---- 3 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Adv-Systems-Management12-Pool              | SLE-Module-Adv-Systems-Management12-Pool              | Yes     | (r ) Yes  | No 4 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Adv-Systems-Management12-Updates           | SLE-Module-Adv-Systems-Management12-Updates           | Yes     | (r ) Yes  | Yes 5 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Containers12-Debuginfo-Pool                | SLE-Module-Containers12-Debuginfo-Pool                | No      | ----      | ---- 6 | SMT-http_smt-ec2_susecloud_net:SLE-Module-Containers12-Debuginfo-Updates             | SLE-Module-Containers12-Debuginfo-Updates             | No      | ----      | ----
 此处你需要检查 enabled列来确定哪些仓库是已被启用的而哪些没有。 在 Suse Linux 中使用 zypper 添加或移除仓库要添加仓库你需要仓库或 .repo 文件的 URI,否则你会遇到如下错误。 root@kerneltalks # zypper addrepo -c SLES12-SP3-UpdatesIf only one argument is used, it must be a URI pointing to a .repo file.
 使用 URI,你可以像如下方式添加仓库: root@kerneltalks # zypper  addrepo -c http://smt-ec2.susecloud.net/repo/SUSE/Products/SLE-SDK/12-SP3/x86_64/product?credentials=SMT-http_smt-ec2_susecloud_net SLE-SDK12-SP3-PoolAdding repository 'SLE-SDK12-SP3-Pool' ...........................................................................................................................[done]Repository 'SLE-SDK12-SP3-Pool' successfully added URI         : http://smt-ec2.susecloud.net/repo/SUSE/Products/SLE-SDK/12-SP3/x86_64/product?credentials=SMT-http_smt-ec2_susecloud_netEnabled     : YesGPG Check   : YesAutorefresh : NoPriority    : 99 (default priority) Repository priorities are without effect. All enabled repositories share the same priority.
 在 Suse 中使用附带 addrepo或ar子命令的zypper命令添加仓库,后接 URI 以及你需要提供一个别名。 要在 Suse 中移除一个仓库,使用附带 removerepo或rr子命令的zypper命令。 root@kerneltalks # zypper removerepo nVidia-Driver-SLE12-SP3Removing repository 'nVidia-Driver-SLE12-SP3' ....................................................................................................................[done]Repository 'nVidia-Driver-SLE12-SP3' has been removed.
 清除 zypper 本地缓存(编辑:南平站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |