genesisweb / valet-linux-plus

Advanced local development experience for Linux.
MIT License
143 stars 23 forks source link

`valet use` command failing on Arch Linux #49

Closed NikarashiHatsu closed 2 years ago

NikarashiHatsu commented 3 years ago

OS details Arch Linux x86_64 Kernel 5.14.2-arch1-2 DE Plasma 5.22.5

How to reproduce

  1. Run valet use 7.4

Error The command simply fails and says: Pacman was unable to install [php7.4-fpm].

Expected Valet changes the PHP version to 7.4.

Screenshot below Screenshot_20210927_014117

I know it's probably a OS compatibility, but I can't figure out any workaround. The best I've tried is to downgrade php-cli and php-fpm using pacman, didn't work, even after running valet restart and rebooting the machine.

hakimzulkufli commented 2 years ago

I am currently stuck at the first installation process, valet install since the script is breaking while trying to look for redis-server, which is just redis on Arch. Valet-Linux+ doesn't seem to be as distro agnostic as the original valet-linux? Or at least valet-linux had better compatibility with Arch since it also understands Arch's package naming scheme.

For example, if your case, php7 in Arch is equivalent to php7.4 in Ubuntu. That reminds me, have you tried running valet use 7 instead?

NikarashiHatsu commented 2 years ago

I'm successfully installed the the Valet Linux+, even though the redis-server is failing, the web server essentials could work perfectly. I tried to run valet use 7, but still there's no success after executing the command.

Screenshot_20211024_181306

It is kinda annoying since I need to switch PHP version manually to meet my servers' requirements, and so far, Valet Linux+ is the best software I've found by its flexibility, and additional features to build modern web-apps. Sadly, it doesn't seem to be distro agnostic.

I might be switching to Docker soon, but not having enough time to learn. Thanks for replying and giving me some insights.

hakimzulkufli commented 2 years ago

Since you're on Arch, try cpriego/valet-linux. That one has better support for Arch and they do check what distro you're using as well. valet use 7 worked fine for me on that one. I'm not sure if this is a fork of project or a completely different port of the original Valet by Laravel. I'm also using phpenv to switch between different versions of PHP on my development machine.

NikarashiHatsu commented 2 years ago

Thank you for your suggestion, I'll try the original valet-linux. Should I keep this issue open, what do you think?

hakimzulkufli commented 2 years ago

Should I keep this issue open, what do you think?

I would say it depends heavily on the package maintainers. Even if you're no longer using the package, whether or not it is an issue is up to the maintainers. If supporting other distros cannot be done (it is a lot of work and heavy lifting after all), they can close this issue.

Anyway, feel free to close it. Anyone else having the same issue in the future can always make a reference to your issue. The maintainers can also reopen it if they want to.

cobraprojects commented 2 years ago

you can just edit valet configration files to fix these issues with archlinx

configration files are in your home directory: ~/.config/composer/vendor/genesisweb/valet-linux-plus/cli/Valet/

you need to edit ValetRedis.php with your favourite text editor and replace all redis-server with redis

if you are using mariadb edit Mysql.php and replace all mysql-service with mariadb

same for every service like php, rename the service name with package name in arch

NikarashiHatsu commented 2 years ago

Hi, it's been a while since I opened this issue.

Currently I'm reverting back to the original Valet Linux, so this issue is already irrelevant.

It is already mentioned that I can simply switch PHP version using use 8 or use74. Thanks a lot for contributors here for help, I really appreciate it. I'm closing this issue.