Reporting of this issue is caveated by my admission that the issue is somewhat over my head in terms of my knowledge surrounding it and so I am reporting it at face value.
I am upgrading from v1.2.5 to v1.3.0 using the 'complete' package here. When I update composer's dependencies with php composer.phar update --no-dev I get the following error and composer aborts (leaving Roundcube inaccessible):
- Installing pear/crypt_gpg (v1.6.0)
Downloading: 100%
[ErrorException]
file_put_contents(<path to my roundcube installation>/vendor/bin/crypt
-gpg-pinentry): failed to open stream: No such file or directory`
Looking in the vendor/bin/ directory, crypt-gpg-pinentry is a symlink to ../pear-pear.php.net/Crypt_GPG/bin/crypt-gpg-pinentry but I am missing the pear-pear.php.net directory from vendor/.
Removing the "pear/crypt_gpg": "~1.6.0" dependency from composer's composer.json file allows the upgrade to complete (and Roundcube to function) however I am not sure if this really is the best solution - perhaps I just don't need the functionality that crypt-gpg-pinentry is providing or I just haven't (yet) discovered the fact that I actually do?
vendor/bin/crypt-gpg-pinentry link points to vendor/pear/crypt_gpg/scripts/crypt-gpg-pinentry in 1.3. The symlink you've got is probably from the old version and composer has problem in updating it. Did you use bin/installto.sh script? I expect it to sync vendor folder properly.
My crypt-gpg-pinentry symlink it is dated 28th April and so presumably indeed exists from an old(er) version.
I did use bin/installto.sh but I must admit to not recalling what its full output was. Is there any way of being able to re-run the script to see what it does/doesn't do? (As things stand it of course detects I am already up-to-date). I am wondering if this might be beneficial in case there is anything besides this symlink that didn't get updated/sync'd.
So, if composer.json file exists /vendor folder is not touched when running installto.sh script. This means that the problem is in composer itself. Here's a complete output of composer update after upgrading 1.2.5 to 1.3.0.
$ php composer.phar update --no-dev
Loading composer repositories with package information
Initializing PEAR repository https://pear.php.net
Updating dependencies
Package operations: 8 installs, 1 update, 8 removals
- Removing pear-pear.php.net/mail_mime (1.10.1)
- Removing roundcube/net_sieve (1.5.4)
- Removing pear-pear.php.net/crypt_gpg (1.4.3)
- Removing pear-pear.php.net/console_commandline (1.2.2)
- Removing pear-pear.php.net/net_smtp (1.7.3)
- Removing pear-pear.php.net/net_socket (1.0.14)
- Removing pear-pear.php.net/net_idna2 (0.1.1)
- Removing pear-pear.php.net/auth_sasl (1.0.6)
- Installing pear/auth_sasl (v1.1.0): Loading from cache
- Installing pear/net_idna2 (v0.2.0): Loading from cache
- Updating pear/net_socket (dev-master 7482c62 => v1.2.1): Checking out f31d75ac35
- Installing pear/net_sieve (1.4.0): Downloading (100%)
- Installing pear/mail_mime (1.10.1): Loading from cache
- Installing pear/net_smtp (1.7.3): Loading from cache
- Installing pear/console_commandline (dev-master 40fca1d): Cloning 40fca1d3da from cache
- Installing pear/crypt_gpg (v1.6.0): Loading from cache
[ErrorException]
file_put_contents(/home/alec/roundcubemail-1.2.5/vendor/bin/crypt-gpg-pinentry): failed to open stream: No such file or directory
Thanks Aleksander.
I updated my vendor/bin/crypt-gpg-pinentry link to points to vendor/pear/crypt_gpg/scripts/crypt-gpg-pinentry and composer now updates without issue
Great! Works also for me. Thanks!
Fix doesn't work for me. vendor/pear/crypt_gpg doesn't exist. Is there a way to fix this?
I had the same error however for me I had to delete this file:
vendor/bin/crypt-gpg-pinentry
After that ran the composer update --no-dev again and installation of crypt-gpg went fine.
Composer developers will not work on this issue, neither I.
Most helpful comment
Thanks Aleksander.
I updated my vendor/bin/crypt-gpg-pinentry link to points to vendor/pear/crypt_gpg/scripts/crypt-gpg-pinentry and composer now updates without issue