CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] OpenFOAM isn't working anymore: "blockMesh: error while loading shared libraries"

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2010, 17:35
Default OpenFOAM isn't working anymore: "blockMesh: error while loading shared libraries"
  #1
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
Hi anyone,

i installed OpenFOAM on my Pc and my Laptop with the great help of this forum.
Now i got a strange Problem.

Today i wanted to start up OpenFoam on my Laptop and tried to run blockMesh.
He gave me the following error:
blockMesh: error while loading shared libraries: libmeshTools.so: cannot open shared object file: No such file or directory

After wondering what happened i tried to start up icoFoam or paraview and he gave me the same error messages, except the pointed library changed.

So i tried the same commands on my pc and the same errors occured. This is extremly strange because the hdd with linux on it was disconnected the last time in my pc. So i didn't changed anything.

Maybe a Ubuntu Update changed something with the librarys?


I would be very happy if anyone could help me!

Thanks a lot
Regards
Leech
Leech is offline   Reply With Quote

Old   October 18, 2010, 18:54
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pierre,

To me it seems that there are only two possible scenarios for what happened to you:
  • Scenario 1: your user's ".bashrc" file got corrupted/damaged.
    Open it for edition by running on a terminal the following command:
    Code:
    gedit $HOME/.bashrc
    Now, do you see the line near the end with:
    Code:
    . /opt/openfoam171/etc/bashrc
    If not, or if the line is slightly different, then that's the reason.
  • Scenario 2: the ".bashrc" file is fine, but the folder "/opt/openfoam171" got mysteriously removed.
    Check if the folder exists or not. For example, run:
    Code:
    ls -l /opt/openfoam171
    Or:
    Code:
    du -sh /opt/openfoam171
    The first one should give you the contents of the folder; the second one should give you the amount of disk space occupied by that folder. If neither give you any expected output, then you'll have to install again following the online instructions.
By the way, did you upgrade Ubuntu from 10.04 to 10.10? If you are not sure of it, run this on your terminal window:
Code:
cat /etc/lsb-release
I haven't tested Ubuntu 10.10, so I don't know if the official Debian packages for OpenFOAM will work.

Best regards,
Bruno
Kummi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   October 19, 2010, 04:41
Default
  #3
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
Hi Bruno,

thanks for your help.
I looked at my bashrc.
It got the lines you mentioned. But with openfoam170.
I changed it to 171 and then the terminal said that there is no such directory.

The other things i cant try out right now, going to work
I'll try it this evening.

Thanks a lot
Pierre
Leech is offline   Reply With Quote

Old   October 19, 2010, 15:10
Default
  #4
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
Hi again,

i tried out the rest of your instructions.
The folder exists, but it's again openfoam170.
It got contents and it occupies something over 320mbs of disc space.

So i'm a bit worried. It seems like i installed open 170. But i thought i downloaded OpenFoam 171.

So i will try to install it again.

Thanks
Leech

ps: I'll give a report here, if it worked well
Leech is offline   Reply With Quote

Old   October 19, 2010, 15:36
Default
  #5
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
Hi,

i tried to reinstall OpenFoam, but it didn't worked.
I followed the instructions exactly.
At the point "Open a new terminal window and test that the icoFoam application, from the OpenFOAM package, is working by typing icoFoam -help"
the shell answers again:
"pierre@pierre-laptop:~$ icoFoam -help
icoFoam: error while loading shared libraries: libfiniteVolume.so: cannot open shared object file: No such file or directory"

I am totally out of ideas...
Any suggestions?

Thanks guys
Pierre
Leech is offline   Reply With Quote

Old   October 19, 2010, 19:27
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pierre,

That's odd... What does this command output:
Code:
echo $LD_LIBRARY_PATH
Additionally, is there anything after the OpenFOAM line in "~/.bashrc"?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 21, 2010, 15:27
Default
  #7
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
Hi,

you were right. I Had some additional lines in the bashrc.
I didn't thought they would change anything.
I added these lines, to automatically set the environnement variables for netgen:

Code:
#Netgen
export NETGENDIR=/opt/netgen/bin
export LD_LIBRARY_PATH=/usr/lib/Togl1.7:/opt/netgen/lib
Can you tell me if there is a way to add these variables in the bashrc? Because Netgen wont work without em.


Thanks a lot again for your help
Pierre
Leech is offline   Reply With Quote

Old   October 21, 2010, 15:38
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pierre,

It's pretty simple Just modify your line for NETGEN's LD_LIBRARY_PATH to this:
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/Togl1.7:/opt/netgen/lib
And voilá, the whole nine yards of library paths are once again available, including NETGEN's

Best regards,
Bruno
Studi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 7, 2016, 11:53
Default Same problem, newer programs
  #9
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hello

I've just updated Ubuntu from 14.04 to 16.04 (maybe regrettably!), without changing anything else. I had OpenFOAM 3.0.x working well before I updated, but now I get the same errors as the above poster.

So when I do
Code:
icoFoam
I get the error 'icoFoam: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory'

When I type
Code:
which icoFoam
I get '/home/ali/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/bin/icoFoam'

And when I do
Code:
echo $LD_LIBRARY_PATH
I get '/home/ali/OpenFOAM/ThirdParty-3.0.x/platforms/linux64Gcc/CGAL-4.7/lib:/home/ali/OpenFOAM/ThirdParty-3.0.x/platforms/linux64Gcc/gperftools-svn/lib:/home/ali/OpenFOAM/ThirdParty-3.0.x/platforms/linux64Gcc/ParaView-4.4.0/lib/paraview-4.4:/home/ali/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/home/ali/OpenFOAM/ThirdParty-3.0.x/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/usr/lib/openmpi/lib:/home/ali/OpenFOAM/ali-3.0.x/platforms/linux64GccDPInt32Opt/lib:/home/ali/OpenFOAM/site/3.0.x/platforms/linux64GccDPInt32Opt/lib:/home/ali/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib:/home/ali/OpenFOAM/ThirdParty-3.0.x/platforms/linux64GccDPInt32Opt/lib:/home/ali/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib/dummy'

Any help would be appreciated. I could reinstall OpenFOAM, but I have quite a lot of solvers etc, which I don't want to lose.

regards

Ali
ali.m.1 is offline   Reply With Quote

Old   September 11, 2016, 12:03
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer @Ali: There are two possible solutions:
  1. You can try using a hack to pretend that the correct library is still being used. The hack I used just now for an old installation of OpenFOAM 3.0.x that I had on another Ubuntu version and that now I tried using on Ubuntu 16.04 x86_64, was this:
    Code:
    ln -s /usr/lib/openmpi/lib/libmpi.so $FOAM_LIBBIN/libmpi.so.1
    ln -s /usr/lib/openmpi/lib/libopen-rte.so $FOAM_LIBBIN/libopen-rte.so.1
    ln -s /usr/lib/openmpi/lib/libopen-pal.so $FOAM_LIBBIN/libopen-pal.so.1
  2. Or the correct way is to do re-build at least the Pstream library, by running the following commands:
    Code:
    cd $FOAM_SRC/Pstream
    ( export WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"; wclean all; wmake all)
sahir, gaza, 87682111 and 4 others like this.
__________________
wyldckat is offline   Reply With Quote

Old   September 12, 2016, 04:51
Default
  #11
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi Bruno

Thanks a lot for your reply. I tried linking libmpi.so.1 to libmpi.so.12, but that didn't work. I ended up having to uninstall and then reinstall OpenFOAM completely (2 days before you replied, so I didn't try your advice).
I had managed to get OpenFOAM's standard solvers to work by just doing ./Allwmake before reinstalling, but my own solvers still had the same issues.
So for anyone else with the same problem, I would recommend trying what Bruno said, and failing that, reinstall OpenFOAM
wyldckat likes this.
ali.m.1 is offline   Reply With Quote

Old   February 13, 2019, 19:16
Default Same issue, foam-extended
  #12
New Member
 
Join Date: Mar 2018
Location: Brazil
Posts: 7
Rep Power: 8
YCarv is on a distinguished road
Hello there,

I already had openFoam 4x installed and now installed foam-extend 4.0. I've added the alias for both instances but I am getting the same error mentioned by Pierre:

error while loading shared libraries: libfoam.so: cannot open shared object file: No such file or directory

the only thing I have after the alias in my .bashrc file are some lines added by anaconda installer, but they do not have a export LD_LIBRARY_PATH line.
I've already tried commenting them to see if that was the issue, without any luck.

I've also tried this:

cd $FOAM_SRC/Pstream
( export WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"; wclean all; wmake all)

but apparently the Pstream folder is missing from my foam-extended folder.
Any help would be appreciated !

Thanks in advance !
YCarv is offline   Reply With Quote

Old   February 17, 2019, 17:22
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: That sounds to me that you first had the OpenFOAM 4 shell environment activated and then tried to activate foam-extend 4 right after on that same terminal.

Start a new terminal and make sure that you don't have any OpenFOAM nor foam-extend version active. You can check by running:
Code:
export | grep FOAM
it should not give you any lines of text, so if it does, then there is a version being activated by default, when it should not be.

If ti gives you anything, then check if there is anything left in "~/.bashrc" is sourcing automatically.

Once you've sorted out that issue, then start a new terminal, double-check if none is activated and then activate foam-extend 4. Then try running Allwmake once again in the main foam-extend folder.
__________________
wyldckat is offline   Reply With Quote

Old   July 20, 2020, 09:05
Default
  #14
Member
 
Join Date: Dec 2009
Location: Kanpur, India
Posts: 54
Rep Power: 16
Shoonya is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer @Ali: There are two possible solutions:
  1. Or the correct way is to do re-build at least the Pstream library, by running the following commands:
    Code:
    cd $FOAM_SRC/Pstream
    ( export WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"; wclean all; wmake all)

Thanks it works. In my case the problem was

blockMesh: error while loading shared libraries: libmpi.so.20: cannot open shared object file: No such file or directory.

The above quoted one commands resolved the problem, i.e.,
$ cd $FOAM_SRC/Pstream
$ export WM_OPTIONS="$WM_OPTIONS
$ wclean all
$ wmake all
govind_IITD likes this.
Shoonya is offline   Reply With Quote

Old   October 22, 2022, 07:33
Default Error in rheotool tutorial running
  #15
New Member
 
Orissa
Join Date: Feb 2022
Posts: 16
Rep Power: 4
pratyush_6174 is on a distinguished road
error while loading shared libraries: libHYPRE-2.20.0.so: cannot open shared object file: No such file or directory


Can anyone please help me to figure out this error??
pratyush_6174 is offline   Reply With Quote

Old   October 22, 2022, 10:42
Default
  #16
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 76
Rep Power: 5
night-hawk is on a distinguished road
Install Hypre
night-hawk is offline   Reply With Quote

Old   October 27, 2022, 10:37
Default
  #17
New Member
 
Orissa
Join Date: Feb 2022
Posts: 16
Rep Power: 4
pratyush_6174 is on a distinguished road
I AM NOT GETTING THIS VERSION libHYPRE-2.23.0.
CAN ANYONE HELP ME TO GET THIS INSTALL
pratyush_6174 is offline   Reply With Quote

Old   October 28, 2022, 00:52
Default
  #18
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 76
Rep Power: 5
night-hawk is on a distinguished road
If you are using debian based distro install using command "sudo apt install libhypre". If you are using LTS version of ubuntu you will not get libhypre-2.23.
night-hawk is offline   Reply With Quote

Old   October 28, 2022, 01:37
Default
  #19
New Member
 
Orissa
Join Date: Feb 2022
Posts: 16
Rep Power: 4
pratyush_6174 is on a distinguished road
I used sudo apt install libhypre but different version of hypre is installed in that so not how can i resolve this error beacause anyhow i want to install rheotool and use it.
pratyush_6174 is offline   Reply With Quote

Old   October 28, 2022, 01:44
Default
  #20
Member
 
Ashutosh
Join Date: Jul 2021
Location: India
Posts: 76
Rep Power: 5
night-hawk is on a distinguished road
How did you install OpenFoam?
night-hawk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
foam-extend_3.1 decompose and pyfoam warning shipman OpenFOAM 3 July 24, 2014 09:14
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 10:01
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 19:07.