Install PHP 7.4

I’m coming from Debian community, so be patient with me please.

I have couple of project that are built on PHP 7.4 they cannot run on PHP 8 or PHP 7.3.

So how can i install PHP 7.4 on Manjoro?

sudo pacman -Syu php7 + additional packages if needed with pattern php7-something :wink:

Thanks for reply, but i got :

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
error: target not found: php7-4

Someone said:
In this case you are running up agains the whole Arch ethos of prioritizing rolling releases of the newest versions of packages. Since Pacman doesn’t maintain support for the the older versions.from source.

The package is called php7

There are some prebuild modules available. For example php7-fpm and so on.

But keep in mind that the php7 packages are expected to be short lived. As soon as all packages start working with PHP 8 it will be removed from the repository.

You might want to read
https://archlinux.org/news/php-80-and-php-7-legacy-packages-are-available/

1 Like

Thanks @xabbu

Here is what i did:

[chawila@PriceMate ~]$ sudo pacman -Syu php7
[sudo] password for chawila: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (3) libzip-1.7.3-1  oniguruma-6.9.6-1  php7-7.4.15-1

Total Installed Size:  24.35 MiB

:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                                                [############################################] 100%
(3/3) checking package integrity                                              [############################################] 100%
(3/3) loading package files                                                   [############################################] 100%
(3/3) checking for file conflicts                                             [############################################] 100%
(3/3) checking available disk space                                           [############################################] 100%
:: Processing package changes...
(1/3) installing libzip                                                       [############################################] 100%
(2/3) installing oniguruma                                                    [############################################] 100%
(3/3) installing php7                                                         [############################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[chawila@PriceMate ~]$ 

Now if i close the terminal and open it again and run PHP here is what i get:

[chawila@PriceMate ~]$ php -v
bash: php: command not found
[chawila@PriceMate ~]$ 

@xabbu @Tomek
It’s ok now.

I’ve restarted the computer.

However i have another problem.
When i install composer, it comes with PHP-8

Composer is compatible with PHP 8. Because of this it is only available for PHP 8.

The availability of an older version of a program is not the standard. It is very unusually. Do not get used to this.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.