{"id":15341,"date":"2024-01-10T15:43:42","date_gmt":"2024-01-10T07:43:42","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=15341"},"modified":"2024-01-10T15:43:42","modified_gmt":"2024-01-10T07:43:42","slug":"uos%e6%89%93%e5%8c%85deb%e8%a6%81%e6%b3%a8%e6%84%8f%e5%93%aa%e4%ba%9b%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/15341\/","title":{"rendered":"uos\u6253\u5305deb\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879"},"content":{"rendered":"

uos\u662f\u57fa\u4e8eUbuntu\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u652f\u6301deb\u5305\u7684\u5b89\u88c5\u548c\u4f7f\u7528\u3002\u5728uos\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dpkg\u547d\u4ee4\u6765\u5b89\u88c5\u3001\u5378\u8f7d\u3001\u67e5\u8be2<\/p>\n

<\/figure>\n<\/p>\n

deb\u5305\u3002\u800c\u6253\u5305deb\u5305\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dpkg-deb\u547d\u4ee4\u6765\u5b8c\u6210\u3002<\/p>\n

exe\u6df7\u6dc6<\/a>\u6253\u5305deb\u5305\u7684\u539f\u7406\u662f\u5c06\u6211\u4eec\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u6309\u7167\u4e00\u5b9a\u7684\u683c\u5f0f\u6253\u5305\u6210\u4e00\u4e2adeb\u5305\uff0c\u7136\u540e\u901a\u8fc7dpkg\u547d\u4ee4\u6765\u5b89\u88c5\u8fd9\u4e2adeb\u5305\u3002\u4e0b\u9762\u6211\u4eec\u6765\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u6253\u5305deb\u5305\u3002<\/p>\n

1. \u521b\u5efa\u6253\u5305\u76ee\u5f55<\/p>\n

\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u6765\u5b58\u653e\u6211\u4eec\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aDEBIAN\u76ee\u5f55\uff0c\u7528\u6765\u5b58\u653e\u63a7\u5236\u6587\u4ef6\u3002<\/p>\n

2. \u7f16\u5199\u63a7\u5236\u6587\u4ef6<\/p>\n

\u5728DEBIAN\u76ee\u5f55\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u7f16\u5199\u63a7\u5236\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5305\u542b\u4e86deb\u5305\u7684\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\u548c\u5b89\u88c5\u89c4\u5219\uff0c\u4f8b\u5982\u5305\u540d\u3001\u7248\u672c\u53f7\u3001\u4f9d\u8d56\u5173\u7cfb\u3001\u5b89\u88c5\u4f4d\u7f6e\u7b49\u3002\u63a7\u5236\u6587\u4ef6\u7684\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

“`<\/p>\n

Package: \u5305\u540d<\/p>\n

Version: \u7248\u672c\u53f7<\/p>\n

Architecture: \u67b6\u6784<\/p>\n

Maintainer: \u7ef4\u62a4\u8005\u4fe1\u606f<\/p>\n

Depends: \u4f9d\u8d56\u5173\u7cfb<\/p>\n

Description: \u5305\u63cf\u8ff0<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0cPackage\u8868\u793a\u5305\u540d\uff0cVersion\u8868\u793a\u7248\u672c\u53f7\uff0cArchitecture\u8868\u793a\u67b6\u6784\uff0cMaintainer\u8868\u793a\u7ef4\u62a4\u8005\u4fe1\u606f\uff0cDepends\u8868\u793a\u4f9d\u8d56\u5173\u7cfb\uff0cDescription\u8868\u793a\u5305\u63cf\u8ff0\u3002<\/p>\n

\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2acontrol\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n

“`<\/p>\n

Package: hello-world<\/p>\n

Version: 1.0<\/p>\n

Architecture: all<\/p>\n

Maintainer: John Doe <\/p>\n

Depends: python<\/p>\n

Description: A simple hello world program.<\/p>\n

“`<\/p>\n

\u5728\u8fd9\u4e2a\u63a7\u5236\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5305\u540d\u4e3ahello-world\uff0c\u7248\u672c\u53f7\u4e3a1.0\uff0c\u67b6\u6784\u4e3aall\uff0c\u7ef4\u62a4\u8005\u4fe1\u606f\u4e3aJohn Doe \uff0c\u4f9d\u8d56\u5173\u7cfbexe\u8f6cmac\u8f6f\u4ef6<\/a>\u4e3apython\uff0c\u5305\u63cf\u8ff0\u4e3aA simple hello world program\u3002<\/p>\n

3. \u5c06\u6587\u4ef6\u548c\u76ee\u5f55\u6253\u5305\u6210deb\u5305<\/p>\n

\u5728\u6211\u4eec\u521b\u5efa\u597d\u63a7\u5236\u6587\u4ef6\u540e\uff0c\u6211\u4eec\u9700\u8981\u5c06\u6587\u4ef6\u548c\u76ee\u5f55\u6253\u5305\u6210deb\u5305\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u4f7f\u7528dpkg-deb\u547d\u4ee4\u6765\u5b8c\u6210\u3002<\/p>\n

\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5c06\u6211\u4eec\u4e4b\u524d\u521b\u5efa\u7684\u76ee\u5f55\u6253\u5305\u6210\u4e00\u4e2adeb\u5305\uff1a<\/p>\n

“`<\/p>\n

dpkg-deb -b hello-world hello-world_1.0_all.deb<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0c-b\u8868\u793a\u6253\u5305\u64cd\u4f5c\uff0chello-world\u8868\u793a\u6211\u4eec\u9700\u8981\u6253\u5305\u7684\u76ee\u5f55\uff0chello-world_1.0_all.deb\u8868\u793a\u6253\u5305\u540e\u7684deb\u5305\u6587\u4ef6\u540d\u3002<\/p>\n

4. \u5b89\u88c5deb\u5305<\/p>\n

\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dpkg\u547d\u4ee4\u6765\u5b89\u88c5\u6211\u4eec\u6253\u5305\u597d\u7684deb\u5305\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\u6211\u4eec\u521a\u521a\u6253\u5305\u597d\u7684hello-world_1.0_all.deb\u5305\uff1a<\/p>\n

“`<\/p>\n

sudo dpkg -i hello-world_1.0_all.deb<\/p>\n

“`<\/p>\n

\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0cdpkg\u4f1a\u6839\u636e\u63a7\u5236\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u5b89\u88c5\u89c4\u5219\u6765\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1\u5305\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n

“`<\/p>\n

dpkg -l | grep hello-world<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0c-l\u8868\u793a\u5217\u51fa\u6240\u6709\u5b89\u88c5\u7684\u5305\uff0cgrep\u8868\u793a\u67e5\u627e\u5305\u542bhello-world\u7684\u884c\u3002\u5982\u679c\u8f93\u51fa\u4e86hello-world\u5305\u7684\u4fe1\u606f\uff0c\u5219\u8868\u793a\u5305\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

\u6253\u5305deb\u5305\u662f\u4e00\u4e2a\u76f8\u5bf9\u7b80\u5355\u7684\u8fc7\u7a0b\uff0c\u6211\u4eec\u53ea\u9700\u8981\u6309\u7167\u4e00\u5b9a\u7684\u683c\u5f0f\u7f16\u5199\u63a7\u5236\u6587\u4ef6\uff0c\u7136\u540e\u4f7f\u7528dpkg-deb\u547d\u4ee4\u5c06\u6587\u4ef6\u548c\u76ee\u5f55\u6253\u5305\u6210deb\u5305\u5373\u53ef\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u81ea\u5df1\u7684\u8f6f\u4ef6\u6253\u5305\u6210deb\u5305\uff0c\u5e76\u5728uos\u7cfb\u7edf\u4e2d\u8fdb\u884c\u5b89\u88c5\u548c\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

uos\u662f\u57fa\u4e8eUbuntu\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u652f\u6301deb\u5305\u7684\u5b89\u88c5\u548c\u4f7f\u7528\u3002\u5728uos\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dpkg\u547d\u4ee4\u6765\u5b89\u88c5\u3001\u5378\u8f7d\u3001\u67e5\u8be2deb\u5305\u3002\u800c\u6253\u5305deb\u5305\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528dpkg-deb\u547d\u4ee4\u6765\u5b8c\u6210\u3002\u6253\u5305deb\u5305\u7684<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[3840,14,16,5989,2097],"topic":[],"class_list":["post-15341","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-exedeb","tag-14","tag-16","tag-5989","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=15341"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15341\/revisions"}],"predecessor-version":[{"id":15397,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/15341\/revisions\/15397"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=15341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=15341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=15341"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=15341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}