libiconv.so.2: cannot open shared object file: no such file or directory

PeterVeldhuis

Verified User
Joined
Jan 18, 2024
Messages
17
Location
Apeldoorn
Sorry, but I need some advice/help here. None of the 4 php-compilations are running anymore.
When trying to rebuil/install I get: libiconv.so.2: cannot open shared object file: no such file or directory.
Any command I run keeps giving me the same error so far.

My goal is get php back up and also my phpmyadmin (I cannot logon to my databases anymore, since my core/php_1 is also no compiling (however so far directAdmin is still running.

I tried looking at https://forum.directadmin.com/threads/updating-php-8-1-error.69674/#post-369472 and https://forum.directadmin.com/threads/solved-centos-7-error-build-php-7-4-8-1.66776/. As well many other posts, but not of them helped me out.

1706475296027.png

I noticed also my named-service stopped running (and I cannot restart it)
 
As well many other posts, but not of them helped me out.
Unfortunately neither will help this for those who want to help you either.

We need to know what you already tried exactly and what error notices you got. And we need the following.
Which distro do you have and which version.
How many ram do you have.
Do you have a swap file present and if yes how big.
Have you seen and tried this post (click) to restore old libiconv for the time being?
 
He Richard,
Thank you for your reply. With that post I got libiconv back installed and now my php is back up and running (until 7.3).
I'm running CentOS linxux 7. Have +/- 1000MB RAM and running also SWAP.

My named-service is not yet back up; not sure if it is was caused by the same issue. I will ping more info on that tomorrow.

1706480757480.png

1706480570914.png
 
1000MB RAM
In total? So that is 1 GB RAM??? That is very little. It's the bare minimum. Would be better to have at least 2 GB.
I hope your swapfile is at least 4 GB too.

my php is back up and running (until 7.3).
Oke, everything ok then now? Or you want to compile php 8.1 or something. If yes is it still throwing errors? If yes, which ones?
 
His swap is also 1gb
So would recommend to run max 1php version.

But way way way better would be to upgrade your system
 
Last edited:
That is too low. Minimal requirement to run DA is 2 GB swap space at least.

Indeed better upgrade.
 
Thank you guys for your recommendation on the memory - I appriciate that very much.
Currently I'm in a setup/testing phase and I prefer the keep the cost low for the moment.
Once we go live I will make sure we level up.

Meanwhile, I would like to migrate my site to PHP8.x.
While installing I get an error:
Code:
configure: error: iconv does not support errno
doPhp_build: failed to compile '/usr/local/directadmin/custombuild/cache/php-8.0.30.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.UlK13Xozaq.php-8.0.30.tar.gz'

Do you have a recommendation how to make sure I keep my server running (on 7.4 for the moment), while installing PHP8.0 as a second instance?
(I need this to be able to debug the site on a test (sub) domain.
 
Googled your problem and found @Richard G again hahaha :


Someone with the same problem:
 
Thanks Eric - it is what I did before and totally crashed my system.
Can you confirm that the following commands are the ones for me to run?

cd /usr/local/directadmin/custombuild
./build update
./build list_removals
./build remove_items
./build remove_old_local libiconv
./build all
da build all
 
I would use:
./build all d
don't know where the d is for but I've always seen it with this.
OR
da build all

So you don't need both. These are the same commands.
So either use ./build all d or use da build all not both because then you are doing the same thing twice.
 
Thank you Richard and Eric. With the commands listed I got it work. For followers - I used the set below:

cd /usr/local/directadmin/custombuild
./build update
./build list_removals
./build remove_items
./build remove_old_local libiconv
./build all d

The last step took almost an hour, so I would advice to take the time to run this properly.
Also you may view the progress in CustomBuild; after a while my virtual screen got disconnected. Don't let yourself think the server crashed.
 
Back
Top