![]() Thanks to the "ondrej/php" repository, you can install any version you want: $ sudo apt-get install php7. To install the latest version of PHP (7.4 at the time I'm writing this article), run the following command: $ sudo apt-get install php7.4 Download the installer package from the releases page onto the Ubuntu machine. Installation via Direct Download PowerShell 7.2 introduced a universal package that makes installation easier. Once this command is executed, refresh the repositories again: $ sudo apt-get update Installing PHP After registration, you can update PowerShell with sudo apt-get install powershell. ![]() If you would like more information on this problem, see this article: Fix apt-get update “the following signatures couldn’t be verified because the public key is not available”. ![]() If your error message contains a different key, you must change the command accordingly. Note that the last option of the command refers to the key in the error message (4F4EA0AAE5267A6C). To solve this problem, execute the following command: $ sudo apt-key adv -keyserver -recv-keys 4F4EA0AAE5267A6C The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C Save the changes (:wq if you are also using vim) and update the repositories: $ sudo apt-get updateĪnother error!! Hit:5 bionic-security InRelease Just look at the already existing lines of the file /etc/apt/sources.list. Replace "bionic" with the name of your Ubuntu version. Note: these two lines are correct if you are using Ubuntu 18.04 (Bionic) or Ubuntu 18.10 LTS. $ sudo vim /etc/apt/sources.listĪdd the following two lines to the end of the file: deb bionic main It is necessary to edit the file /etc/apt/sources.list. Cannot add PPA: 'ppa:~ondrej/ubuntu/php'.ĮRROR: '~ondrej' user or team does not exist. If you get the error below, then you need to add the repository manually. ![]() If the repository has been successfully added, you are in luck! You can go directly to the "Installing PHP" section. Nothing complicated here, let's just execute the following command : $ sudo add-apt-repository ppa:ondrej/php To install the latest version of PHP, you have to add the ondrej/php repository. The latest version of PHP is not often immediately available in Ubuntu repositories, even less under Ubuntu on Windows (WSL: Windows Subsytem for Linux) where the installed version is often the LTS (Long Term Support) version. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |