Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after update from 1.6.3 to 1.6.6 value stop work #101

Open
hosamalzagh opened this issue May 3, 2023 · 3 comments
Open

after update from 1.6.3 to 1.6.6 value stop work #101

hosamalzagh opened this issue May 3, 2023 · 3 comments

Comments

@hosamalzagh
Copy link

hosamalzagh commented May 3, 2023

valet update
There is a new release of Valet Linux
Updating now...
Changed current directory to /home/predo/.config/composer
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals

  • Upgrading genesisweb/valet-linux-plus (1.6.3 => 1.6.6)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 0 installs, 1 update, 0 removals
  • Downloading genesisweb/valet-linux-plus (1.6.6)
  • Upgrading genesisweb/valet-linux-plus (1.6.3 => 1.6.6): Extracting archive
    Generating autoload files
    12 packages you are using are looking for funding.
    Use the composer fund command to find out more!
    No security vulnerability advisories found
    [sudo] password for predo:
    Nginx was already enabled
    Stopping nginx...
    [php82-fpm] is not installed, installing it now via Pacman
    error: target not found: php82-fpm

In Pacman.php line 85:

Pacman was unable to install [php82-fpm].


my os is arch


╰─❯ valet --version
ValetLinux+ v1.6.6


i try
valet use php8-fpm | valet use php | php8| php82

Changing php version...

In Systemd.php line 224:

Unable to determine service name.


php -v
PHP 8.2.5 (cli) (built: Apr 12 2023 15:55:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies


i try put this /etc/pacman.conf
[home_el_archphp_Arch]
Server = https://download.opensuse.org/repositories/home:/el:/archphp/Arch/$arch

valet use 82
Changing php version...
[php82-fpm] is not installed, installing it now via Pacman
warning: database file for 'home_el_archphp_Arch' does not exist (use '-Sy' to download)
error: target not found: php82-fpm

╰─❯ valet use 8
Changing php version...
[php8-fpm] is not installed, installing it now via Pacman
warning: database file for 'home_el_archphp_Arch' does not exist (use '-Sy' to download)
error: target not found: php8-fpm

@uttamrabadiya

@uttamrabadiya
Copy link
Collaborator

@hosamalzagh
I forgot to mention further steps, could you please try below steps and confirm if it works

Run the following command to store the PHP key and fingerprint variables:

key=$(curl -fsSL https://download.opensuse.org/repositories/home:el:archphp/Arch/$(uname -m)/home_el_archphp_Arch.key)
fingerprint=$(gpg --quiet --with-colons --import-options show-only --import --fingerprint <<< "${key}" | awk -F: '$1 == "fpr" { print $10 }')

Next, initialize the key with the following command:

pacman-key --init

Next, add the key and fingerprint with the following command:

pacman-key --add - <<< "${key}"
pacman-key --lsign-key "${fingerprint}"

Finally, update the repository with the following command:

pacman -Syy

After this, valet use 8.2 should work fine for you.

Thanks!

@hosamalzagh
Copy link
Author

@uttamrabadiya befor you replay i edit
/home/predo/.config/composer/vendor/genesisweb/valet-linux-plus/cli/Valet/PackageManagers/Pacman.php
i add public $latest = 82;

edit public function getPhpFpmName($version)
{
$pattern = !empty(self::PHP_FPM_PATTERN_BY_VERSION[$version])
? self::PHP_FPM_PATTERN_BY_VERSION[$version] : 'php{VERSION_WITHOUT_DOT}-fpm';
$version = preg_replace('[^\d]', '', $version);

    $version = $version == $this->latest ? '':$version;

    return str_replace('{VERSION_WITHOUT_DOT}', $version, $pattern);
}

he work fine

i will try your replay abow and tell you

@hosamalzagh
Copy link
Author

It seems that the code is searching for a service named "php82-fpm", but in Arch Linux, the service is named "php-fpm".

this code
key=$(curl -fsSL https://download.opensuse.org/repositories/home:el:archphp/Arch/$(uname -m)/home_el_archphp_Arch.key)
fingerprint=$(gpg --quiet --with-colons --import-options show-only --import --fingerprint <<< "${key}" | awk -F: '$1 == "fpr" { print $10 }')

not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants