omega8cc / boa

Barracuda Octopus Aegir 5.5.0-PRO
https://omega8.cc/compare
394 stars 75 forks source link

curl: command not found #1809

Closed velpan closed 2 months ago

velpan commented 2 months ago

In a old BOA.4.1.1 system I get this error.

/var/xdrago/daily.sh: line 530: curl: command not found php: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

Is there a way to rebuild Curl without change the whole system?

Thank you for your support

omega8cc commented 2 months ago

Yes, curl should be rebuilt automatically once you run wget -qO- http://files.aegir.cc/BOA.sh.txt | bash

However, for legacy systems we have tested this only on Debian Stretch.

Please always provide required details, so we don't need to guess: boa info

velpan commented 2 months ago

` server:~# boa info /usr/bin/php-cli: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory /usr/bin/php-cli: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory /usr/bin/php-cli: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

Aegir BOA-4.1.1-dev on / x86_64 HOST Hetzner VPS Linux KVM guest DSK 37/100 CPU 2 RAM 7813 NGX 1.19.1 DBV 10.2.32 RDS 6.0.5 SHD 8.2p1 SSH OpenSSH_8.2p1, OpenSSL 1.0.1t 3 May 2016 SSL line CRL line CRL_From_Packages NO CRL_Local_Bin NO _AUT _AUTOPILOT=YES _CCC _CUSTOM_CONFIG_CSF=NO _CCL _CUSTOM_CONFIG_LSHELL=NO _CCR _CUSTOM_CONFIG_REDIS=NO _CCS _CUSTOM_CONFIG_SQL=NO _DBG _DEBUG_MODE=NO _DBS _DB_SERIES=10.2 _DNS _DNS_SETUP_TEST=YES _EXP _EXTRA_PACKAGES= _MFS _MAGICK_FROM_SOURCES=NO _MFX _MODULES_FIX=YES _PCV _PHP_CLI_VERSION=7.2 _PEC _PHP_EXTRA_CONF="" _PFD _PHP_FPM_DENY="" _PFV _PHP_FPM_VERSION=7.2 _PFX _PERMISSIONS_FIX=YES _PMI _PHP_MULTI_INSTALL="5.6 7.3 7.4" _PSI _PHP_SINGLE_INSTALL= _SAR _SSH_ARMOUR=NO _SBP _STRICT_BIN_PERMISSIONS=YES _SFS _SSH_FROM_SOURCES=YES _STP _STRONG_PASSWORDS=NO _SUO _SYSTEM_UPGRADE_ONLY=NO _UMY _USE_MYSQLTUNER=YES _XTR _XTRAS_LIST="CSF CHV FTP WMN CSS ADM" _AUT _AUTOPILOT=YES

Sun Sep 16 01:27:46 CEST 2018 / Debian.jessie x86_64 XEN / Aegir BOA-2.4.9 / Barracuda BOA-2.4.9 / Nginx 1.9.12 / PHP-MI 5.6 / PHP-SE 5.6 / FPM 5.6 / CLI 5.6 /MariaDB-10.0.36 localhost Sun Sep 16 02:21:26 CEST 2018 / Debian.jessie x86_64 XEN / Aegir BOA-2.4.9 / Barracuda BOA-2.4.9 / Nginx 1.9.12 / PHP-MI 5.6 / PHP-SE 5.6 / FPM 5.6 / CLI 5.6 /MariaDB-10.0.36 localhost Mon Sep 17 00:43:24 CEST 2018 / Debian.jessie x86_64 Linux KVM guest / Aegir BOA-3.2.2 / Barracuda BOA-3.2.2 / Nginx 1.13.8 / PHP-MI 5.6 / PHP-SE 5.6 / FPM 5.6 / CLI 5.6 / MariaDB-10.1.36 localhost Mon Sep 17 00:52:02 CEST 2018 / Debian.jessie x86_64 Linux KVM guest / Aegir BOA-3.2.2 / Barracuda BOA-3.2.2 / Nginx 1.13.8 / PHP-MI 5.6 / PHP-SE 5.6 / FPM 5.6 / CLI 5.6 / MariaDB-10.1.36 localhost Sat Jul 18 23:10:31 CEST 2020 / Debian.jessie x86_64 Linux KVM guest / Aegir HEAD / Barracuda BOA-4.1.1-dev / Nginx 1.19.1 / PHP-MI 5.6 7.0 7.2 7.3 / PHP-SE / FPM 7.2 / CLI 7.2 / MariaDB-10.2.32 localhost `

velpan commented 2 months ago

Why BOA try to upgrade itself ? I found files like: .ctrl.cli.540ltsT02.pid inside the "static/control" folder What those files are for? By the way all sites give a 502 error now.

I just want the system stay in the legacy state. Is this possible?

I appreciate your work and help, you gyus are awesome

omega8cc commented 2 months ago

If you wish to keep the system in its legacy state, then you need to add _SKYNET_MODE=OFF to /root/.barracuda.cnf

It will then still update only its own BOA tools in /opt/local/bin plus it will try to fix curl if broken, which is causing problems, I guess. Perhaps we could replace using curl with wget for these limited updates in /opt/local/bin when _SKYNET_MODE=OFF is present in /root/.barracuda.cnf

For now, please disable the auto-updates with _SKYNET_MODE=OFF and look for the most recent /var/backups/legacy-libcurl-pre-*/libcurl* backup of libcurl

Then please create a backup of /usr/lib/x86_64-linux-gnu/ and copy the libcurl files and symlinks back from /var/backups/legacy-libcurl-pre-*/libcurl* to /usr/lib/x86_64-linux-gnu/

Then run ldconfig -- this should fix the problem with libcurl.so.4 and all services should work again, even if you will see the warning when checking curl version with curl -V

velpan commented 2 months ago

Thanks for the detailed info. I did all the steps, Set the _SKYNET_MODE=OFF I copied the 2 files from /var/backups/legacy-libcurl-pre-*/libcurl* to /usr/lib/x86_64-linux-gnu/ and run ldconfig

The sites are back and running fine.

I still have to run wget -qO- http://files.aegir.cc/BOA.sh.txt | bash to get curl back, right? because Curl is missing...

omega8cc commented 2 months ago

Yes. It should install curl from sources but shouldn’t move away the legacy libcurl. Let us know how this worked.

Sent with GitHawk

omega8cc commented 2 months ago

But if it fails to install curl from sources, simply install it from packages (but you may have to adjust apt sources to point to Debian archives. We should automate that probably..

Sent with GitHawk

velpan commented 2 months ago

OK Curl is back

server:~# curl -V curl 8.9.1 (x86_64-pc-linux-gnu) libcurl/8.9.1 OpenSSL/1.0.1t zlib/1.2.8 OpenLDAP/2.4.40 Release-Date: 2024-07-31 Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets

velpan commented 2 months ago

I re-open this issue because today ANOTHER legacy server with BOA v 3.2.2 (on Debian GNU/Linux 7.11 wheezy) has a similar problem,

All sites are down with a 502 error and php56-fpm service is stopped. Try to restart it and get

root@server ~ # service php56-fpm start Starting php56-fpm../opt/php56/sbin/php-fpm: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory failed I followed the steps you mentioned above I copied the files from /var/backups/legacy-libcurl-pre-*/libcurl* to /usr/lib/x86_64-linux-gnu/ and run ldconfig

but it didn't work. Please give me your valued help in this case too. Thank you.

kaszarobert commented 2 months ago

We had the same problem on an old Debian Jessie server. We solved that by reinstalling it apt-get update && apt-get install --reinstall libcurl3 We also had a problem with Debian Jessie package repository no longer existing and that way apt-get update did not work at first, so we had to also fix the repo URLs just like this https://forums.debian.net/viewtopic.php?p=768996&sid=61f983422410ed7d70ecd77657604033#p768996

velpan commented 2 months ago

Thank you @kaszarobert for your help. I will wait for @omega8cc answer to proceed

omega8cc commented 2 months ago

We understand the challenges of maintaining legacy systems, but unfortunately, we no longer provide support for outdated versions. It’s important to upgrade your system while it’s still possible to do so smoothly. We’ve worked hard to ensure that the current BOA version runs reliably on both Debian Jessie and Stretch, and it performs well under normal conditions.

However, if your server hasn’t been upgraded for an extended period and is missing essential components, such as valid apt sources, it may lead to significant issues. While we strive to enhance support for legacy systems, years of neglect may still result in problems that are beyond our scope to address.

If you require additional assistance, we encourage you to consider our extended support options, including a Pro license or hourly support services.

velpan commented 2 months ago

Where can I found the services you offer and the cost?

omega8cc commented 2 months ago

Everything is explained with links in this document: https://github.com/omega8cc/boa/blob/5.x-dev/DUALLICENSE.md