{"id":205971,"date":"2020-11-30T09:25:20","date_gmt":"2020-11-30T01:25:20","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=205971"},"modified":"2020-11-24T16:26:42","modified_gmt":"2020-11-24T08:26:42","slug":"suse-zypper-manage","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/suse-zypper-manage.html","title":{"rendered":"SUSE Linux \u7684Zypper\u5305\u7ba1\u7406\u5668\u4f7f\u7528\u5b9e\u4f8b"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nZypper\u662fSuSE Linux\u4e2d\u7528\u4e8e\u5b89\u88c5\uff0c\u66f4\u65b0\uff0c\u5220\u9664\u8f6f\u4ef6\uff0c\u7ba1\u7406\u5b58\u50a8\u5e93\uff0c\u6267\u884c\u5404\u79cd\u67e5\u8be2\u64cd\u4f5c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u5c06\u8ba8\u8bbazypper\u547d\u4ee4\u7684\u4e0d\u540c\u793a\u4f8b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u8bed\u6cd5\uff1a<\/p>\n

\r\n# zypper [--global-opts]  [--command-opts] [command-arguments]\r\n<\/pre>\n
\u7cfb\u7edf\u7248\u672c<\/strong><\/div>\n

openSUSE leap 15.2<\/p>\n

\u5b9e\u4f8b\u4e00\uff1a\u5217\u51fa\u53ef\u7528\u7684\u5168\u5c40\u9009\u9879\u548c\u547d\u4ee4\u3002<\/strong><\/div>\n

\u8f93\u5165zypper<\/code>\u547d\u4ee4\uff0c\u5b83\u5c06\u663e\u793a\u53ef\u5728zypper\u4e2d\u4f7f\u7528\u7684\u6240\u6709\u5168\u5c40\u9009\u9879\u548c\u547d\u4ee4\u3002<\/p>\n

\r\na3f8298a0fe2:\/ # zypper\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e8c\uff1a\u83b7\u53d6zypper\u5b50\u547d\u4ee4\u7684\u5e2e\u52a9<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper help [\u5b50\u547d\u4ee4]<\/p>\n

\r\na3f8298a0fe2:\/ # zypper help remove\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e09\uff1a\u5217\u51fa\u4ed3\u5e93<\/strong><\/div>\n
\r\na3f8298a0fe2:\/ # zypper repos\r\n\u6216\u8005\r\na3f8298a0fe2:\/ # zypper lr\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u56db\uff1a\u5237\u65b0\u4ed3\u5e93\u6570\u636e\u5e93<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper refresh \u6216\u8005 zypper ref <\/p>\n

\r\na3f8298a0fe2:\/ # zypper ref\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e94\uff1a\u5b89\u88c5\u8f6f\u4ef6<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper install \u6216\u8005 zypper in <\/p>\n

\r\na3f8298a0fe2:\/ # zypper in -y vim\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u516d\uff1a\u5220\u9664\u8f6f\u4ef6<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper remove \u6216\u8005 zypper rm <\/p>\n

\r\na3f8298a0fe2:\/ # zypper rm -y vim\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e03\uff1a\u66f4\u65b0\u8f6f\u4ef6\u5305<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper update \u6216\u8005 zypper up <\/p>\n

\r\na3f8298a0fe2:\/ # zypper update -y zypper\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u516b\uff1a\u641c\u7d22\u5b89\u88c5\u5305<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper search \u6216\u8005 zypper se <\/p>\n

\r\na3f8298a0fe2:\/ # zypper se gnome-desktop\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e5d\uff1a\u67e5\u770b\u5b89\u88c5\u5305\u8be6\u7ec6\u4fe1\u606f<\/strong><\/div>\n

\u8bed\u6cd5\uff1azypper info \u6216\u8005 zypper if <\/p>\n

\r\na3f8298a0fe2:\/ # zypper info apache2\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u5341\uff1a\u6e05\u695azypper\u7f13\u5b58<\/strong><\/div>\n

\u5982\u679c\u53ea\u60f3\u6e05\u7406zypper\u7f13\u5b58\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\r\na3f8298a0fe2:\/ # zypper clean\r\nAll repositories have been cleaned up.\r\n<\/pre>\n

\u5982\u679c\u60f3\u7acb\u5373\u6e05\u9664\u5143\u6570\u636e\u548c\u7a0b\u5e8f\u5305\u7f13\u5b58\uff0c\u5219\u4f7f\u7528zypper clean -a\u9009\u9879\uff1a<\/p>\n

\r\na3f8298a0fe2:\/ # zypper clean -a\r\nAll repositories have been cleaned up.\r\n<\/pre>\n
\u603b\u7ed3<\/strong><\/div>\n

Zypper\u662fSuSE Linux\u4e2d\u7528\u4e8e\u5b89\u88c5\uff0c\u66f4\u65b0\uff0c\u5220\u9664\u8f6f\u4ef6\uff0c\u7ba1\u7406\u5b58\u50a8\u5e93\uff0c\u6267\u884c\u5404\u79cd\u67e5\u8be2\u64cd\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u8bed\u6cd5\uff1a # zypper [–global-opts] [–command-opts] [command- […]<\/p>\n","protected":false},"author":309,"featured_media":205972,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-205971","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=205971"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205971\/revisions"}],"predecessor-version":[{"id":205983,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205971\/revisions\/205983"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/205972"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=205971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=205971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=205971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}