Q. I’m trying to upgrade my PHP version from 5.2.6 to 5.2.8 using portupgrade command. But I’m getting following errors:
*** Error code 1
Stop in /usr/ports/lang/php5.
*** Error code 1Stop in /usr/ports/lang/php5.
*** Error code 1Stop in /usr/ports/lang/php5.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.42275.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php5-pcre-5.2.6_2 UPGRADE_PORT_VER=5.2.6_2 make reinstall
—> Restoring the old version
pkg_add: warning: package ‘php5-pcre-5.2.6_2’ requires ‘php5-5.2.8’, but ‘php5-pcre-5.2.6_2’ is installed
** Fix the installation problem and try again.
[Updating the pkgdb in /var/db/pkg … – 62 packages found (-0 +1) . done] ** Listing the failed packages (-:ignored / *:skipped / !:failed)
! lang/php5 (php5-pcre-5.2.6_2) (install error)
How do I fix this problem and upgrade php5-pcre?
A. This is well known problem and can be fixed easily.
As of php 5.2.7, pcre extension is distributed with the core php5 package, and not as a standalone module anymore. Follow these steps to update your installation:
# pkg_delete -f php5-pcre-5.2.6
# pkgdb -F
# portupgrade php5-pcre
If you are using portmaster, enter:
# pkg_delete -f php5-pcre\*
# portmaster php5\*
If you are using pecl ports you might need to force an update on them, enter:
# portupgrade -f pecl\*
OR
# portmaster pecl\*
If you have the pecl hash, json and/or zip extensions you need to replace them with the php5 bundled ones, enter
# portupgrade -o archivers/php5-zip archivers/pecl-zip
# portupgrade -o devel/php5-json devel/pecl-json
# portupgrade -o security/php5-hash security/pecl-hash
OR
# portmaster -o archivers/php5-zip archivers/pecl-zip
# portmaster -o devel/php5-json devel/pecl-json
# portmaster -o security/php5-hash security/pecl-hash
Finally ,build your INDEX locally and you tried to build it after the php update commit, you need to rebuild it after you updated lang/php5:
# cd /usr/ports
# make index
References
- man page make, portmaster, portupgrade, /usr/ports/UPDATING
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
After a night of googling, I found my answer on your blog…
Thanks for all this good BSD stuff you publish…