SUSE Linux系统中zypper命令用法汇总


Zypper是SUSE Linux下用于管理软件的程序,拥有多种功能,那么Linux下要如何使用Zypper命令来管理软件呢?下面小编就给大家介绍下SUSE Linux使用Zypper命令的方法,感兴趣的朋友可以来了解下。

Zypper是SUSE Linux中用于安装,升级,卸载,管理仓库、进行各种包查询的命令行接口。本篇将会讨论zypper的几个不同命令的例子。

语法:

# zypper [--global-opts] 《command》 [--command-opts] [command-arguments]

中括号中的部分可以不需要。执行zypper最简单的方法是输入 zypper 及 。

例子1:列出可用的全局选项和命令

打开终端,输入zypper并按回车,它会显示所有可用的全局选项和命令。

linux-xa3t:~# zypper

例子2:获得zypper的某个命令的帮助

语法: zypper help [command]

linux-xa3t:~# zypper help remove

remove (rm)[options]《capability》。。.

Remove packages with specified capabilities.

A capability is NAME[.ARCH][OP《VERSION》],where OP is one of 《,《=,=,》=,》。

Command options:

-r,--repo 《alias|#|URI》Load only the specified repository.

-t,--type 《type》Type of package(package, patch, pattern, product)。

Default:package.

-n,--name Select packages by plain name,notby capability.

-C,--capability Select packages by capability.

--debug-solver Create solver test casefor debugging.

-R,--no-force-resolution Donot force the solver to find solution,let it ask.

--force-resolution Force the solver to find a solution (even an aggressive one)。

-u,--clean-deps Automatically remove unneeded dependencies.

-U,--no-clean-deps No automatic removal of unneeded dependencies.

-D,--dry-run Test the removal,donot actually remove.

例子3:打开zypper shell/会话

linux-xa3t:~# zypper sh

zypper》

linux-xa3t:~# zypper shell

zypper》

例子4:列出已定义的仓库

linux-xa3t:~# zypper repos

linux-xa3t:~# zypper lr

4.1) 以表格的形式列出仓库的URI

4.2) 以优先级列出仓库

linux-xa3t:~# zypper lr -p



上一篇:Lubuntu使用Docky时提示混合错误的解决方法

下一篇:Linux启动vi编辑器时提示E325: ATTENTION如何办?


SUSELinux susezypper susezypper源
Copyright © 2002-2019 测速网 www.inhv.cn 皖ICP备2023010105号
测速城市 测速地区 测速街道 网速测试城市 网速测试地区 网速测试街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!

热门搜索 城市网站建设 地区网站制作 街道网页设计 大写数字 热点城市 热点地区 热点街道 热点时间 房贷计算器