{"id":1900,"date":"2025-08-06T05:25:59","date_gmt":"2025-08-05T21:25:59","guid":{"rendered":"https:\/\/www.hgfwq.com\/blog\/?p=1900"},"modified":"2025-08-06T05:25:59","modified_gmt":"2025-08-05T21:25:59","slug":"ubuntu-%e6%94%af%e6%8c%81%e7%9a%84-glibc-%e7%89%88%e6%9c%ac%e8%a7%a3%e6%9e%90%e4%b8%8e%e5%ae%89%e8%a3%85%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.hgfwq.com\/blog\/1900.html","title":{"rendered":"Ubuntu \u652f\u6301\u7684 glibc \u7248\u672c\u89e3\u6790\u4e0e\u5b89\u88c5\u6307\u5357"},"content":{"rendered":"<p><h>\u6587\u7ae0\u6807\u9898\uff1aUbuntu\u652f\u6301glibc\u7248\u672c\u8be6\u7ec6\u6307\u5357<\/h><\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.hgfwq.com\/blog\/wp-content\/uploads\/2025\/07\/GJgryNfJZ.jpg\" alt=\"Ubuntu \u652f\u6301\u7684 glibc \u7248\u672c\u89e3\u6790\u4e0e\u5b89\u88c5\u6307\u5357\" title=\"Ubuntu \u652f\u6301\u7684 glibc \u7248\u672c\u89e3\u6790\u4e0e\u5b89\u88c5\u6307\u5357\"><\/p>\n<p><p>\u5e8f\u53f71\uff1a\u5f15\u8a00<\/p>\n<\/p>\n<p><p>glibc\uff08GNU C Library\uff09\u662fLinux\u7cfb\u7edf\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u8bb8\u591a\u57fa\u672c\u7684\u7cfb\u7edf\u8c03\u7528\u548cAPI\uff0c\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u80fd\u591f\u5728\u4e0d\u540c\u7684Linux\u53d1\u884c\u7248\u4e0a\u8fd0\u884c\u3002Ubuntu\u4f5c\u4e3a\u6700\u53d7\u6b22\u8fce\u7684Linux\u53d1\u884c\u7248\u4e4b\u4e00\uff0c\u5bf9glibc\u7684\u652f\u6301\u81f3\u5173\u91cd\u8981\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Ubuntu\u4e0a\u67e5\u770b\u652f\u6301\u7684glibc\u7248\u672c\uff0c\u5e76\u6307\u5bfc\u5982\u4f55\u5347\u7ea7\u6216\u964d\u7ea7glibc\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p>\u5e8f\u53f72\uff1a\u67e5\u770bUbuntu\u652f\u6301\u7684glibc\u7248\u672c<\/p>\n<\/p>\n<p><p>\u8981\u67e5\u770bUbuntu\u652f\u6301\u7684glibc\u7248\u672c\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u7ec8\u7aef\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5e76\u56de\u8f66\uff1a<\/li>\n<li><code>apt-cache policy libgcc1<\/code><\/li>\n<\/ol>\n<p><p>\u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793alibgcc1\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5176\u4e2d\u5305\u62ecglibc\u7684\u7248\u672c\u3002\u67e5\u627elibgcc1\u5305\u7684Version\u5217\uff0c\u5373\u53ef\u627e\u5230\u5f53\u524dUbuntu\u652f\u6301\u7684glibc\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p>\u5e8f\u53f73\uff1a\u5347\u7ea7glibc\u7248\u672c<\/p>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u9700\u8981\u5347\u7ea7glibc\u7248\u672c\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u66f4\u65b0\u7cfb\u7edf\u8f6f\u4ef6\u5305\u5217\u8868\uff1a<\/li>\n<li><code>sudo apt update<\/code><\/li>\n<li>\u5b89\u88c5glibc\u7248\u672c\u5347\u7ea7\u5de5\u5177\uff1a<\/li>\n<li><code>sudo apt install libgc1<\/code><\/li>\n<li>\u67e5\u770b\u53ef\u7528\u7684glibc\u7248\u672c\u5e76\u9009\u62e9\u8981\u5347\u7ea7\u7684\u7248\u672c\uff1a<\/li>\n<li><code>sudo apt-get install libgc1=\u7248\u672c\u53f7<\/code>\uff08\u5c06\u201c\u7248\u672c\u53f7\u201d\u66ff\u6362\u4e3a\u60a8\u5e0c\u671b\u5b89\u88c5\u7684glibc\u7248\u672c\uff09<\/li>\n<li>\u786e\u8ba4\u5347\u7ea7\u5e76\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\uff1a<\/li>\n<li><code>sudo apt-get install -y libgc1=\u7248\u672c\u53f7<\/code><\/li>\n<\/ol>\n<p><p>\u8bf7\u6ce8\u610f\uff0c\u5728\u5347\u7ea7glibc\u7248\u672c\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u4e86\u89e3\u5347\u7ea7\u53ef\u80fd\u5e26\u6765\u7684\u98ce\u9669\uff0c\u5e76\u505a\u597d\u5907\u4efd\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u5e8f\u53f74\uff1a\u964d\u7ea7glibc\u7248\u672c<\/p>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u964d\u7ea7glibc\u7248\u672c\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u66f4\u65b0\u7cfb\u7edf\u8f6f\u4ef6\u5305\u5217\u8868\uff1a<\/li>\n<li><code>sudo apt update<\/code><\/li>\n<li>\u67e5\u627e\u53ef\u7528\u7684glibc\u7248\u672c\u964d\u7ea7\u5305\uff1a<\/li>\n<li><code>apt-cache showpkg libgc1<\/code><\/li>\n<li>\u9009\u62e9\u8981\u964d\u7ea7\u7684glibc\u7248\u672c\u5e76\u5b89\u88c5\uff1a<\/li>\n<li><code>sudo apt-get install libgc1=\u7248\u672c\u53f7<\/code>\uff08\u5c06\u201c\u7248\u672c\u53f7\u201d\u66ff\u6362\u4e3a\u60a8\u5e0c\u671b\u964d\u7ea7\u7684glibc\u7248\u672c\uff09<\/li>\n<li>\u786e\u8ba4\u964d\u7ea7\u5e76\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\uff1a<\/li>\n<li><code>sudo apt-get install -y libgc1=\u7248\u672c\u53f7<\/code><\/li>\n<\/ol>\n<p><p>\u540c\u6837\uff0c\u5728\u964d\u7ea7glibc\u7248\u672c\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u4e86\u89e3\u964d\u7ea7\u53ef\u80fd\u5e26\u6765\u7684\u98ce\u9669\uff0c\u5e76\u505a\u597d\u5907\u4efd\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u5e8f\u53f75\uff1a\u6ce8\u610f\u4e8b\u9879<\/p>\n<\/p>\n<p><p>\u5728\u5347\u7ea7\u6216\u964d\u7ea7glibc\u7248\u672c\u65f6\uff0c\u8bf7\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u5df2\u5907\u4efd\uff0c\u4ee5\u9632\u6570\u636e\u4e22\u5931\u3002<\/li>\n<li>\u5728\u5347\u7ea7\u6216\u964d\u7ea7\u524d\uff0c\u68c0\u67e5\u5e94\u7528\u7a0b\u5e8f\u548c\u7cfb\u7edf\u670d\u52a1\u662f\u5426\u517c\u5bb9\u65b0\u7248\u672c\u7684glibc\u3002<\/li>\n<li>\u5728\u5347\u7ea7\u6216\u964d\u7ea7\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u53ca\u65f6\u67e5\u9605\u76f8\u5173\u6587\u6863\u6216\u5bfb\u6c42\u6280\u672f\u652f\u6301\u3002<\/li>\n<\/ul>\n<p><h>\u95ee\u7b54\u73af\u8282<\/h><\/p>\n<p><b>\u95ee\u98981\uff1a<\/b>\u5982\u4f55\u67e5\u770bUbuntu\u5f53\u524d\u5b89\u88c5\u7684glibc\u7248\u672c\uff1f<\/p>\n<p><p>\u7b54\uff1a\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>apt-cache policy libgcc1<\/code>\uff0c\u67e5\u770blibgcc1\u5305\u7684Version\u5217\u5373\u53ef\u627e\u5230\u5f53\u524dUbuntu\u652f\u6301\u7684glibc\u7248\u672c\u3002<\/p>\n<\/p>\n<p><b>\u95ee\u98982\uff1a<\/b>\u5347\u7ea7glibc\u7248\u672c\u540e\uff0c\u5982\u4f55\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u517c\u5bb9\u65b0\u7248\u672c\uff1f<\/p>\n<p><p>\u7b54\uff1a\u5728\u5347\u7ea7glibc\u7248\u672c\u4e4b\u524d\uff0c\u5efa\u8bae\u68c0\u67e5\u5e94\u7528\u7a0b\u5e8f\u7684\u5b98\u65b9\u6587\u6863\u6216\u8054\u7cfb\u5f00\u53d1\u8005\uff0c\u786e\u8ba4\u5e94\u7528\u7a0b\u5e8f\u662f\u5426\u517c\u5bb9\u65b0\u7248\u672c\u7684glibc\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u5728\u5347\u7ea7\u540e\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u6d4b\u8bd5\uff0c\u786e\u4fdd\u5176\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><b>\u95ee\u98983\uff1a<\/b>\u964d\u7ea7glibc\u7248\u672c\u65f6\uff0c\u6709\u54ea\u4e9b\u98ce\u9669\u9700\u8981\u6ce8\u610f\uff1f<\/p>\n<p><p>\u7b54\uff1a\u964d\u7ea7glibc\u7248\u672c\u53ef\u80fd\u5bfc\u81f4\u67d0\u4e9b\u5e94\u7528\u7a0b\u5e8f\u6216\u7cfb\u7edf\u670d\u52a1\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u56e0\u4e3a\u5b83\u4eec\u53ef\u80fd\u4f9d\u8d56\u4e8e\u8f83\u9ad8\u7248\u672c\u7684glibc\u3002\u5728\u964d\u7ea7\u524d\uff0c\u8bf7\u786e\u4fdd\u5907\u4efd\u7cfb\u7edf\uff0c\u5e76\u6d4b\u8bd5\u5173\u952e\u5e94\u7528\u7a0b\u5e8f\u5728\u964d\u7ea7\u540e\u7684\u517c\u5bb9\u6027\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6807\u9898\uff1aUbuntu\u652f\u6301glibc\u7248\u672c\u8be6\u7ec6\u6307\u5357 \u5e8f\u53f71\uff1a\u5f15\u8a00 glibc\uff08GNU C Library\uff09\u662fLinux\u7cfb\u7edf\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u8bb8\u591a\u57fa\u672c\u7684\u7cfb\u7edf\u8c03\u7528\u548cAPI\uff0c\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u80fd\u591f\u5728\u4e0d\u540c\u7684Linux\u53d1\u884c\u7248\u4e0a\u8fd0\u884c\u3002Ubuntu\u4f5c\u4e3a\u6700\u53d7&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1901,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[536,130,135],"topic":[],"class_list":["post-1900","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-haiwai","tag-glibc","tag-ubuntu","tag-135"],"_links":{"self":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/1900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/comments?post=1900"}],"version-history":[{"count":1,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/1900\/revisions"}],"predecessor-version":[{"id":1903,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/posts\/1900\/revisions\/1903"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/media\/1901"}],"wp:attachment":[{"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/media?parent=1900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/categories?post=1900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/tags?post=1900"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hgfwq.com\/blog\/wp-json\/wp\/v2\/topic?post=1900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}