{"id":264994,"date":"2023-02-22T22:21:45","date_gmt":"2023-02-22T14:21:45","guid":{"rendered":"https:\/\/gulass.cn\/lczxtgmldyfj.html"},"modified":"2023-02-22T22:21:45","modified_gmt":"2023-02-22T14:21:45","slug":"lczxtgmldyfj","status":"publish","type":"post","link":"https:\/\/gulass.cn\/lczxtgmldyfj.html","title":{"rendered":"Linux\u64cd\u4f5c\u7cfb\u7edf-get\u547d\u4ee4\u7684\u7528\u6cd5\uff0c\u5177\u4f53\u5e94\u8be5\u5982\u4f55\u4f7f\u7528\uff1f"},"content":{"rendered":"

apt-get\u547d\u4ee4<\/a>\u9002\u7528\u4e8edeb\u5305\u7ba1\u7406\u5f0f\u7684Linux<\/a>\u64cd\u4f5c\u7cfb\u7edf<\/a>\uff08Debian\u3001Ubuntu\u7b49\uff09\uff0c\u4e3b\u8981\u7528\u4e8e\u624b\u52a8\u4ece\u4e92\u8054\u7f51\u8f6f\u4ef6\u5e93\u623f\u4e2d\u641c\u7d22\u3001\u4e0b\u8f7d\u3001\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d\u8f6f\u4ef6\u6216\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n

\u4e0b\u8fb9\u7ed9\u4f60\u4eec\u7b80\u5355\u5206\u4eab\u4e00\u4e0b\uff1aapt-get\u547d\u4ee4\u7684\u7528\u6cd5linux vi\uff0c\u5177\u4f53\u5e94\u5f53\u600e\u6837\u4f7f\u7528apt-get\u547d\u4ee4\uff1f<\/p>\n

\u4e00\u3001apt-get\u5b89\u88c5\u8f6f\u4ef6\u5305<\/p>\n

\n

apt-get install PackageName                 \/\/ \u666e\u901a\u5b89\u88c5\napt-get install PackageName=VersionName     \/\/ \u5b89\u88c5\u6307\u5b9a\u5305\u7684\u6307\u5b9a\u7248\u672c\napt-get --reinstall install PackageName     \/\/ \u91cd\u65b0\u5b89\u88c5\napt-get build-dep PackageName               \/\/ \u5b89\u88c5\u6e90\u7801\u5305\u6240\u9700\u8981\u7684\u7f16\u8bd1\u73af\u5883\napt-get -f install                          \/\/ \u4fee\u590d\u4f9d\u8d56\u5173\u7cfb\napt-get source PackageName                  \/\/ \u4e0b\u8f7d\u8f6f\u4ef6\u5305\u7684\u6e90\u7801<\/code><\/pre>\n<\/p>\n

\u4e8c\u3001apt-get\u5378\u8f7d\u8f6f\u4ef6\u5305<\/p>\n

\n

apt-get remove PackageName              \/\/ \u5220\u9664\u8f6f\u4ef6\u5305, \u4fdd\u7559\u914d\u7f6e\u6587\u4ef6\n

\u4e3a\u4ec0\u4e48\u7a0b\u5e8f\u5378\u8f7d\u6216\u66f4\u6539\u7a0b\u5e8f_linux \u7a0b\u5e8f\u5378\u8f7d_\u5982\u4f55\u5378\u8f7dqq\u5ba0\u7269\u7a0b\u5e8f<\/p>\napt-get --purge remove PackageName \/\/ \u5220\u9664\u8f6f\u4ef6\u5305, \u540c\u65f6\u5220\u9664\u914d\u7f6e\u6587\u4ef6\napt-get purge PackageName \/\/ \u5220\u9664\u8f6f\u4ef6\u5305, \u540c\u65f6\u5220\u9664\u914d\u7f6e\u6587\u4ef6\napt-get autoremove PackageName \/\/ \u5220\u9664\u8f6f\u4ef6\u5305, \u540c\u65f6\u5220\u9664\u4e3a\u6ee1\u8db3\u4f9d\u8d56\n \/\/ \u800c\u81ea\u52a8\u5b89\u88c5\u4e14\u4e0d\u518d\u4f7f\u7528\u7684\u8f6f\u4ef6\u5305\napt-get --purge autoremove PackageName \/\/ \u5220\u9664\u8f6f\u4ef6\u5305, \u5220\u9664\u914d\u7f6e\u6587\u4ef6, \n \/\/ \u5220\u9664\u4e0d\u518d\u4f7f\u7528\u7684\u4f9d\u8d56\u5305\napt-get clean && apt-get autoclean \/\/ \u6e05\u9664 \u5df2\u4e0b\u8f7d\u7684\u8f6f\u4ef6\u5305 \u548c \u65e7\u8f6f\u4ef6\u5305<\/code><\/pre>\n<\/p>\n

\u4e09\u3001apt-get\u66f4\u65b0\u8f6f\u4ef6\u5305<\/p>\n

linux \u7a0b\u5e8f\u5378\u8f7d_\u4e3a\u4ec0\u4e48\u7a0b\u5e8f\u5378\u8f7d\u6216\u66f4\u6539\u7a0b\u5e8f_\u5982\u4f55\u5378\u8f7dqq\u5ba0\u7269\u7a0b\u5e8f<\/p>\n

\n

apt-get update                  \/\/ \u66f4\u65b0\u5b89\u88c5\u6e90\uff08Source\uff09\napt-get upgrade                 \/\/ \u66f4\u65b0\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\napt-get dist-upgrade            \/\/ \u66f4\u65b0\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\uff08\u8bc6\u522b\u5e76\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\u7684\u6539\u53d8\uff09\n<\/code><\/pre>\n<\/p>\n

\u56db\u3001apt-get\u67e5\u8be2\u8f6f\u4ef6\u5305<\/p>\n

\n

dpkg -l                             \/\/ \u5217\u51fa\u5df2\u5b89\u88c5\u7684\u6240\u6709\u8f6f\u4ef6\u5305\napt-cache search PackageName        \/\/ \u641c\u7d22\u8f6f\u4ef6\u5305\napt-cache show PackageName          \/\/ \u83b7\u53d6\u8f6f\u4ef6\u5305\u7684\u76f8\u5173\u4fe1\u606f, \u5982\u8bf4\u660e\u3001\u5927\u5c0f\u3001\u7248\u672c\u7b49\napt-cache depends PackageName       \/\/ \u67e5\u770b\u8be5\u8f6f\u4ef6\u5305\u9700\u8981\u54ea\u4e9b\u4f9d\u8d56\u5305\napt-cache rdepends PackageName      \/\/ \u67e5\u770b\u8be5\u8f6f\u4ef6\u5305\u88ab\u54ea\u4e9b\u5305\u4f9d\u8d56\n

\u4e3a\u4ec0\u4e48\u7a0b\u5e8f\u5378\u8f7d\u6216\u66f4\u6539\u7a0b\u5e8f_\u5982\u4f55\u5378\u8f7dqq\u5ba0\u7269\u7a0b\u5e8f_linux \u7a0b\u5e8f\u5378\u8f7d<\/p>\napt-get check \/\/ \u68c0\u67e5\u662f\u5426\u6709\u635f\u574f\u7684\u4f9d\u8d56<\/code><\/pre>\n<\/p>\n

\u547d\u4ee4\uff1aapt-get--help<\/p>\n

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

apt-get[\u9009\u9879]\u547d\u4ee4<\/p>\n

apt-get[\u9009\u9879]install|remove\u8f6f\u4ef6\u53051[\u8f6f\u4ef6\u53052...]<\/p>\n

apt-get[\u9009\u9879]source\u8f6f\u4ef6\u53051[\u8f6f\u4ef6\u53052...]<\/p>\n

apt-get\u662f\u4e00\u4e2a\u7528\u4e8e\u4e0b\u8f7d\u548c\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u7b80\u6613\u547d\u4ee4\u884c\u754c\u9762\u3002\u6700\u5e38\u7528\u547d\u4ee4\u662fupdate\u548cinstall\u3002<\/p>\n

\u547d\u4ee4\uff1a<\/p>\n

update-\u62ff\u56de\u66f4\u65b0\u7684\u8f6f\u4ef6\u5305\u5217\u8868\u4fe1\u606f<\/p>\n

upgrade-\u8fdb\u884c\u4e00\u6b21\u5347\u7ea7<\/p>\n

install-\u5b89\u88c5\u65b0\u7684\u8f6f\u4ef6\u5305(\u6ce8\uff1a\u8f6f\u4ef6\u5305\u540d\u79f0\u662flibc6\u800c\u975elibc6.deb)<\/p>\n

linux \u7a0b\u5e8f\u5378\u8f7d_\u4e3a\u4ec0\u4e48\u7a0b\u5e8f\u5378\u8f7d\u6216\u66f4\u6539\u7a0b\u5e8f_\u5982\u4f55\u5378\u8f7dqq\u5ba0\u7269\u7a0b\u5e8f<\/p>\n

remove-\u5378\u8f7d\u8f6f\u4ef6\u5305<\/p>\n

autoremove-\u5378\u8f7d\u6240\u6709\u624b\u52a8\u5b89\u88c5\u4e14\u4e0d\u518d\u4f7f\u7528\u7684\u8f6f\u4ef6\u5305<\/p>\n

purge-\u5378\u8f7d\u5e76\u6e05\u7406\u8f6f\u4ef6\u5305\u7684\u914d\u7f6e<\/p>\n

source-\u4e0b\u8f7d\u6e90\u7801\u5305\u6587\u4ef6<\/p>\n

build-dep-\u4e3a\u6e90\u7801\u5305\u914d\u7f6e\u6240\u9700\u7684\u7f16\u8bd1\u4f9d\u8d56\u5173\u7cfb<\/p>\n

dist-upgrade-\u53d1\u5e03\u7248\u5347\u7ea7linux \u7a0b\u5e8f\u5378\u8f7d<\/strong>\uff0c\u89c1apt-get(8)<\/p>\n

dselect-upgrade-\u6309\u7167dselect\u7684\u9009\u62e9\u6765\u8fdb\u884c\u5347\u7ea7<\/p>\n

clean-\u5220\u6389\u6240\u6709\u5df2\u4e0b\u8f7d\u7684\u5305\u6587\u4ef6<\/p>\n

autoclean-\u5220\u6389\u5df2\u4e0b\u8f7d\u7684\u65e7\u5305\u6587\u4ef6<\/p>\n

check-\u6838\u5b9e\u4ee5\u786e\u8ba4\u7cfb\u7edf\u7684\u4f9d\u8d56\u5173\u7cfb\u7684\u5b8c\u6574\u6027<\/p>\n

changelog-\u4e0b\u8f7d\u6307\u5b9a\u8f6f\u4ef6\u5305\uff0c\u5e76\u663e\u793a\u5176changelog<\/p>\n

download-\u4e0b\u8f7d\u6307\u5b9a\u7684\u4e8c\u8865\u7801\u5305\u5230\u5f53\u524d\u76ee\u5f55<\/p>\n

\u5982\u4f55\u5378\u8f7dqq\u5ba0\u7269\u7a0b\u5e8f_\u4e3a\u4ec0\u4e48\u7a0b\u5e8f\u5378\u8f7d\u6216\u66f4\u6539\u7a0b\u5e8f_linux \u7a0b\u5e8f\u5378\u8f7d<\/p>\n

\u9009\u9879\uff1a<\/p>\n

-h\u672c\u5e2e\u52a9\u6587\u6863\u3002<\/p>\n

-q\u8ba9\u8f93\u51fa\u53ef\u4f5c\u4e3a\u65e5\u5fd7-\u4e0d\u663e\u793a\u8fdb\u5ea6<\/p>\n

-\u4e0d\u4ec5\u9519\u8bef\u5916\uff0c\u54ea\u4e9b\u90fd\u4e0d\u8f93\u51fa<\/p>\n

-d\u4ec5\u4ec5\u4e0b\u8f7d-\u3010\u4e0d\u3011\u5b89\u88c5\u6216\u89e3\u5f00\u5305\u6587\u4ef6<\/p>\n

-s\u4e0d\u4f5c\u5b9e\u9645\u64cd\u4f5c\u3002\u53ea\u662f\u4f9d\u6b21\u6a21\u62df\u6267\u884c\u547d\u4ee4<\/p>\n

-y\u5bf9\u6240\u6709\u5bfb\u95ee\u90fd\u56de\u7b54\u662f(Yes)\uff0c\u540c\u65f6\u4e0d\u4f5c\u4efb\u4f55\u63d0\u793a<\/p>\n

-f\u5f53\u51fa\u73b0\u635f\u574f\u7684\u4f9d\u8d56\u5173\u7cfb\u65f6\uff0c\u7a0b\u5e8f\u5c06\u5c1d\u8bd5\u4fee\u6b63\u7cfb\u7edf<\/p>\n

-m\u5f53\u6709\u5305\u6587\u4ef6\u96be\u4ee5\u627e\u5230\u65f6\uff0c\u7a0b\u5e8f\u4ecd\u5c1d\u8bd5\u7ee7\u7eed\u6267\u884c<\/p>\n

-u\u663e\u793a\u5df2\u5347\u7ea7\u7684\u8f6f\u4ef6\u5305\u5217\u8868<\/p>\n

-b\u5728\u4e0b\u8f7d\u5b8c\u6e90\u7801\u5305\u540elinux \u7a0b\u5e8f\u5378\u8f7d<\/strong>\uff0c\u7f16\u8bd1\u751f\u6210\u76f8\u5e94\u7684\u8f6f\u4ef6\u5305<\/p>\n

-V\u663e\u793a\u8be6\u7ec6\u7684\u7248\u672c\u53f7<\/p>\n

-c=?\u8bfb\u53d6\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6<\/p>\n

-o=?\u8bbe\u7f6e\u4efb\u610f\u6307\u5b9a\u7684\u914d\u7f6e\u9009\u9879\u624b\u673alinux\u64cd\u4f5c\u7cfb\u7edf\uff0c\u6bd4\u5982-odir::cache=\/tmp<\/p>\n","protected":false},"excerpt":{"rendered":"

\u64cd\u4f5c\u7cfb\u7edf\uff08Debian\u3001Ubuntu\u7b49\uff09\uff0c\u4e3b\u8981\u7528\u4e8e\u81ea\u52a8\u4ece\u4e92\u8054\u7f51\u8f6f\u4ef6\u4ed3\u5e93\u4e2d\u641c\u7d22\u3001\u4e0b\u8f7d\u3001\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d\u8f6f\u4ef6\u6216\u64cd\u4f5c\u7cfb\u7edf\u3002\u5b89\u88c5\u8f6f\u4ef6\u5305\u66f4\u65b0\u8f6f\u4ef6\u5305\u67e5\u8be2\u8f6f\u4ef6\u5305\u662f\u4e00\u4e2a\u7528\u4e8e\u4e0b\u8f7d\u548c\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u7b80\u6613\u547d\u4ee4\u884c\u754c\u9762\u3002\u53d6\u56de\u66f4\u65b0\u7684\u8f6f\u4ef6\u5305\u5217\u8868\u4fe1\u606f\u5378\u8f7d\u6240\u6709\u81ea\u52a8\u5b89\u88c5\u4e14\u4e0d\u518d\u4f7f\u7528\u7684\u8f6f\u4ef6\u5305\u5378\u8f7d\u5e76\u6e05\u9664\u8f6f\u4ef6\u5305\u7684\u914d\u7f6e\u4e0b\u8f7d\u6307\u5b9a\u8f6f\u4ef6\u5305\uff0c\u5e76\u663e\u793a\u5176changelog\u663e\u793a\u5df2\u5347\u7ea7\u7684\u8f6f\u4ef6\u5305\u5217\u8868\u5728\u4e0b\u8f7d\u5b8c\u6e90\u7801\u5305\u540e\uff0c\u7f16\u8bd1\u751f\u6210\u76f8\u5e94\u7684\u8f6f\u4ef6\u5305<\/p>\n","protected":false},"author":1,"featured_media":264995,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-264994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/264994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=264994"}],"version-history":[{"count":0,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/264994\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/264995"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=264994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=264994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=264994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}