{"id":3738,"date":"2023-12-06T15:35:06","date_gmt":"2023-12-06T07:35:06","guid":{"rendered":"https:\/\/learn-house.idv.tw\/?p=3738"},"modified":"2024-01-16T15:34:23","modified_gmt":"2024-01-16T07:34:23","slug":"%e5%8d%87%e7%b4%9aphp%e5%87%ba%e7%8f%becouldnt-find-any-package-by-glob-php8-2","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=3738","title":{"rendered":"\u5347\u7d1aPHP\u51fa\u73feCouldn't find any package by glob 'php8.2'"},"content":{"rendered":"\n<p>\u8cc7\u6599\u4f86\u6e90\uff1ahttps:\/\/www.thedataops.org\/how-to-upgrade-php-version-from-8-1-to-8-2-in-ubuntu<\/p>\n\n\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u6b63\u5e38\u5347\u7d1aPHP\u6703\u7d93\u904e\u4ee5\u4e0b\u6b65\u9a5f<!--more--><\/p>\n<p><!-- \/wp:paragraph --> <!-- wp:paragraph --><\/p>\n<p><strong>Add PPA for PHP 8.2<\/strong><\/p>\n<blockquote>\n<p>sudo apt install software-properties-common<br \/>sudo add-apt-repository ppa:ondrej\/php<br \/>sudo apt-get update<\/p>\n<\/blockquote>\n<p><!-- \/wp:paragraph --><\/p>\n<p><strong>Install PHP 8.2<\/strong><\/p>\n<blockquote>\n<p>sudo apt install php8.2<\/p>\n<\/blockquote>\n<p>\u4f46\u57f7\u884cinstall php8.2\u537b\u51fa\u73fe<\/p>\n<p>sudo apt install php8.2<br \/>\u6b63\u5728\u8b80\u53d6\u5957\u4ef6\u6e05\u55ae\u2026 \u5b8c\u6210<br \/>\u6b63\u5728\u91cd\u5efa\u76f8\u4f9d\u95dc\u4fc2\u2026 \u5b8c\u6210<br \/>\u6b63\u5728\u8b80\u53d6\u72c0\u614b\u8cc7\u6599\u2026 \u5b8c\u6210<br \/>E: \u627e\u4e0d\u5230\u5957\u4ef6 php8.2<br \/>E: Couldn't find any package by glob 'php8.2'<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u53ea\u8981\u65b0\u589e<a href=\"https:\/\/packages.sury.org\/php\/\">https:\/\/packages.sury.org\/php<\/a>\u5230php.list\u5373\u53ef<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>echo \"deb\u00a0<a href=\"https:\/\/packages.sury.org\/php\/\">https:\/\/packages.sury.org\/php\/<\/a>\u00a0bullseye main\" &gt; \/etc\/apt\/sources.list.d\/php.list<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4f46\u537b\u53c8\u51fa\u73fe<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>yuchin@raspi:\/home3$ sudo apt-get update<br \/>Get:1 https:\/\/packages.sury.org\/php bullseye InRelease [7551 B]<br \/>Hit:2 http:\/\/ppa.launchpad.net\/ondrej\/php\/ubuntu hirsute InRelease<br \/>Err:1 https:\/\/packages.sury.org\/php bullseye InRelease<br \/>The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743<br \/>Hit:3 http:\/\/old-releases.ubuntu.com\/ubuntu hirsute InRelease<br \/>Hit:4 http:\/\/old-releases.ubuntu.com\/ubuntu hirsute-updates InRelease<br \/>Hit:5 http:\/\/old-releases.ubuntu.com\/ubuntu hirsute-backports InRelease<br \/>Hit:6 http:\/\/old-releases.ubuntu.com\/ubuntu hirsute-security InRelease<br \/>Reading package lists\u2026 Done<br \/>W: GPG error: https:\/\/packages.sury.org\/php bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743<br \/>E: The repository 'https:\/\/packages.sury.org\/php bullseye InRelease' is not signed.<br \/>N: Updating from such a repository can't be done securely, and is therefore disabled by default.<br \/>N: See apt-secure(8) manpage for repository creation and user configuration details.<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u900f\u904e\u4ee5\u4e0b\u65b9\u5f0f\u8a2d\u5b9a\u4f46\u9019\u88e1\u7684B188E2B695BD4743\u8981\u63db\u6210\u4f60\u57f7\u884c\u6642\u51fa\u73fe\u7684public number<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:preformatted --><\/p>\n<pre class=\"wp-block-preformatted\">gpg --keyserver pgpkeys.mit.edu --recv-key B188E2B695BD4743\ngpg -a --export B188E2B695BD4743 | sudo apt-key add -<\/pre>\n<p><!-- \/wp:preformatted --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5c31\u53ef\u4ee5\u7e7c\u7e8c<\/p>\n<p><strong>Install PHP 8.2 Packages<\/strong><\/p>\n<blockquote>\n<p>sudo apt install php8.2-common php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-curl php8.2-gd php8.2-imagick php8.2-cli php8.2-dev php8.2-imap php8.2-mbstring php8.2-opcache php8.2-soap php8.2-zip php8.2-intl -y<\/p>\n<\/blockquote>\n<p><strong>PHP 8 Enable<\/strong><\/p>\n<blockquote>\n<p>sudo a2dismod php7.3<br \/>sudo a2enmod php8.2<br \/>sudo service apache2 restart<\/p>\n<\/blockquote>\n<p><!-- \/wp:paragraph --><\/p>","protected":false},"excerpt":{"rendered":"<p>\u8cc7\u6599\u4f86\u6e90\uff1ahttps:\/\/www.thedataops.org\/how-to-upgrade-php-vers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-3738","post","type-post","status-publish","format-standard","hentry","category-6"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3738"}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3738"}],"version-history":[{"count":1,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3738\/revisions"}],"predecessor-version":[{"id":4114,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/3738\/revisions\/4114"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}