Repository navigation
Labels
bugSomething isn't workingSomething isn't workingbug-confirmedMaintainers could reproduce the issue and will investigateMaintainers could reproduce the issue and will investigatemaintainer investigatingThis ticket is being investigated by maintainers. Please check with us before contributing PRs etc!This ticket is being investigated by maintainers. Please check with us before contributing PRs etc!
Milestone
Description
What are you trying to do?
Update pie by running pie self-update.
What platform, and PIE version are you using?
π₯§ PHP Installer for Extensions (PIE) 1.3.7, from The PHP Foundation
You are running PHP 8.4.17
Target PHP installation: 8.4.17 nts, on Linux/OSX/etc arm64 (from /opt/homebrew/Cellar/php@8.4/8.4.17/bin/php)
where pie
/opt/homebrew/bin/pie
Steps to reproduce the issue
- Install pie using brew
- run
pie self-update - run
pie -v-- will show "command not found" for pie
What do you expect to happen?
The issue is resolved by updating using brew and running brew link --overwrite pie. However, I'd expect pie self-update to do this painlessly so the user doesn't have to figure out what to fix.
What is actually happening
After running pie self-update, the pie command in no longer found.
Complete logs/output
pie self-update
π₯§ PHP Installer for Extensions (PIE) 1.3.7, from The PHP Foundation
Updating using the stable channel.
You are running PHP 8.4.17
Target PHP installation: 8.4.17 nts, on Linux/OSX/etc arm64 (from /opt/homebrew/Cellar/php@8.4/8.4.17/bin/php)
You are currently running PIE version 1.3.7
β
Verified the new PIE version
β
PIE has been upgraded to 1.4.0
β mongo-php-library git:(7a8a596a) β sudo pie install mongodb/mongodb-extension
sudo: pie: command not found
β mongo-php-library git:(7a8a596a) β pie install mongodb/mongodb-extension
zsh: permission denied: pie
Anything else?
I'm unsure if this is specifically because of the fact that it's brew-installed, but that's my first instinct.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingbug-confirmedMaintainers could reproduce the issue and will investigateMaintainers could reproduce the issue and will investigatemaintainer investigatingThis ticket is being investigated by maintainers. Please check with us before contributing PRs etc!This ticket is being investigated by maintainers. Please check with us before contributing PRs etc!
Activity
asgrim commentedon Apr 10, 2026
Hmm; I can reproduce this (ish) I get similar behaviour with slightly different messages;
That said, I think the issue is the same; PIE writes itself to the same location it runs from; in this case
/opt/homebrew/bin/pie- but that is originally a symlink.My initial thought to solve this was to
realpath(..)that directory (for me, resolves to/opt/homebrew/Cellar/pie/1.3.10/bin/pie); but then I thought, we'd be replacing/opt/homebrew/Cellar/pie/1.3.10/bin/pie(with 1.3.10) with the newer version (1.4.0, at the time of writing); whilst it would work, I'm not sure it's ideal as the version wouldn't match the path it is in.I'm wondering if a better approach is we should check if we're installed using
brew(e.g. "my path contains/opt/homebrew/Cellar" or similar check - maybe we can check the homebrew cellar path or something); and then suggest the user upgrades withbrew upgrade pieto get the latest, instead.A similar approach could be taken with the EPEL distribution in Fedora; we could add the check into PIE if we're using that install mechanism (not sure how to detect that off my head) and suggest they update with
yum/dnfinstead. This also reduces the need for the EPEL maintainer to apply that patch to disablepie self-update. @remicollet would that be of any help? If so, do you know how PIE could detect if it is installed with EPEL distribution at runtime?remicollet commentedon Apr 15, 2026
We don't patch to disable
pie self-update, the condition already exists, we only add a message about how to updateSee https://src.fedoraproject.org/rpms/pie/blob/rawhide/f/pie-rpm.patch#_28
Using shell
Using PHP (but requiring rpminfo ext)
asgrim commentedon Apr 15, 2026
@remicollet thank you - that is helpful - and yes that makes sense, because you're not running in PHAR π
asgrim commentedon Apr 15, 2026
A few checks we can perform, for improved messaging:
/opt/homebrew/Cellarand don't update - suggest they should update withbrew upgrade pierpm --query --file /usr/bin/pieto see if it resolves (indicates it was installed with RPM) and don't update - suggest they should update withdnf upgrade pie(or justdnf upgrade)realpath()for the symlinkalcaeus commentedon Apr 15, 2026
You'll want to check for both
/opt/homebrew/and/usr/local, as the latter is still used when installing on an Intel Mac. Theoretically users could have a custom directory, but this is not recommended by Brew so I think we can disregard that scenario.asgrim commentedon Apr 15, 2026
Thanks - good shout; although
/usr/localis not really something we should block forself-update(since that's where it goes on Linux); I'll investigate a bit more to cover Intel OSX πremicollet commentedon Apr 15, 2026
Probably better to replace
/usr/bin/pieby the path of the used command (ex: could be manually installed as/usr/local/bin/piewhich is for nomal user before /usr/bin in the search path)derickr commentedon Apr 15, 2026
That's what I run (in QEMU) and I can confirm the default brew is in
/usr/localbutpieis a symlink to something withCellarin the name: