{"id":8702,"date":"2021-07-30T08:58:30","date_gmt":"2021-07-30T08:58:30","guid":{"rendered":"https:\/\/linuxways.net\/?p=8702"},"modified":"2021-07-30T08:58:30","modified_gmt":"2021-07-30T08:58:30","slug":"how-to-install-php-8-0-on-debian-mint","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-php-8-0-on-debian-mint\/","title":{"rendered":"How to Install PHP 8.0 on Debian \/ Mint"},"content":{"rendered":"<p>Originally developed by Rasmus Lerdorf, a Danish-Canadian developer, <a href=\"https:\/\/www.php.net\/\">PHP<\/a> is a server-side scripting language that is geared towards the development of both dynamic and static webpages. PHP is a recursive acronym for PHP Hypertext Preprocessor but was initially an acronym for Personal Home Page. Currently, two PHP releases are receiving active support &#8211; PHP 7.4 and PHP 8.0.<\/p>\n<p>The most current and stable release is PHP 8.0. It was released on Nov 16, 2020, and enjoys support until 2023provides <a href=\"https:\/\/www.php.net\/releases\/8.0\/en.php\">improvements and enhancements<\/a> such as named arguments, null safe operator, union types, JIT (Just In Type) compiler, and improvements in consistency and error-handling.<\/p>\n<p>In this tutorial, we will demonstrate the installation of PHP 8.0 on Debian \/ Linux Mint.<\/p>\n<p><strong>Step 1: Update the system<\/strong><\/p>\n<p>To get off the ground, we are going to update the package list of the system.<\/p>\n<pre><strong>$ sudo apt update<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"186\" class=\"wp-image-8703\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-683.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-683.png 805w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-683-300x69.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-683-768x177.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/p>\n<p>Once updated, install the dependencies required.<\/p>\n<pre><strong>$ sudo apt install software-properties-common ca-certificates lsb_release apt-transport-https<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"216\" class=\"wp-image-8704\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-684.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-684.png 901w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-684-300x72.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-684-768x184.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/strong><\/p>\n<p><strong>Step 2: Enable the Sury APT repository<\/strong><\/p>\n<p>The next step is to add the <a href=\"https:\/\/packages.sury.org\/php\/\">SURY repository<\/a> to our system. SURY is a third-party PHP repository that packages PHP packages for Debian. To add the repository, run the command<\/p>\n<pre><strong>$ sudo sh -c 'echo \"deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main\" &gt; \/etc\/apt\/sources.list.d\/php.list'<\/strong><\/pre>\n<p>Next, import the repository\u2019s GPG key.<\/p>\n<pre><strong>$ wget -qO - https:\/\/packages.sury.org\/php\/apt.gpg | sudo apt-key add -<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"92\" class=\"wp-image-8705\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-685.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-685.png 815w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-685-300x34.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-685-768x87.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><\/p>\n<p><strong>Step 3: Install PHP 8.0<\/strong><\/p>\n<p>To install PHP 8.0, update the package lists to sync with the newly added SURY repository<\/p>\n<pre><strong>$ sudo apt update<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"844\" height=\"243\" class=\"wp-image-8706\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-686.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-686.png 844w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-686-300x86.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-686-768x221.png 768w\" sizes=\"auto, (max-width: 844px) 100vw, 844px\" \/><\/p>\n<p>Then install PHP 8.0 on Debian Buster as follows.<\/p>\n<pre><strong>$ sudo apt install php8.0<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"355\" class=\"wp-image-8707\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-687.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-687.png 847w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-687-300x126.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-687-768x322.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/p>\n<p>Once installed, verify the PHP release installed:<\/p>\n<pre><strong>$ php -v<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"136\" class=\"wp-image-8708\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-688.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-688.png 682w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-688-300x60.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/strong><\/p>\n<p>Additionally, you can install PHP extensions using the syntax:<\/p>\n<pre><strong>$ sudo apt install php-extension<\/strong><\/pre>\n<p>If you are installing multiple extensions, specify them inside the curly braces as shown. In this example, we are installing the <strong>php-cli, php-mbstring, php-xml, php-common, php-ldap <\/strong> the<strong> php-curl <\/strong>extensions.<\/p>\n<pre><strong>$ sudo apt install php8.0-{cli,mbstring,xml,common,ldap,curl}<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"79\" class=\"wp-image-8709\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-689.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-689.png 759w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-689-300x31.png 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>And that\u2019s how to install PHP 8.0 on Debian 10. We wish you an eventful time in your web development!<\/p>","protected":false},"excerpt":{"rendered":"<p>Originally developed by Rasmus Lerdorf, a Danish-Canadian developer, PHP is a server-side scripting language that is geared towards the development of both dynamic and static webpages. PHP is&hellip;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[17,129,70],"class_list":["post-8702","post","type-post","status-publish","format-standard","hentry","category-debian","category-mint","tag-debian-10","tag-linux-mint-20","tag-php"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=8702"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8702\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=8702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=8702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=8702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}