|
[Sponsors] |
How to solve the zlib.h missing problem without root right |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 29, 2013, 22:17 |
How to solve the zlib.h missing problem without root right
|
#1 | |
New Member
wuyu
Join Date: Mar 2010
Posts: 27
Rep Power: 16 |
Dear All,
I want to build OpenFOAM 2.2.0 on my workstation. But it has to be say that I do not have the root right and the administrator is reluctant to give me the right. The first error occurred is "fatal error: zlib.h: No such file or directory." I know that is definitely because the missing of zlib-dev. But since I have no root right, I download zlib source and install it with custom path. I tried to set the CPPFLAGS as the zlib include directory and even set the LD_LIBRARY_PATH as the libz.so as suggested by this post Quote:
How to solve this zlib.h missing problem without root right? Best Reagards |
||
June 9, 2013, 06:54 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings seasoul,
Unfortunately that quoted post is incorrect. The variable "LD_LIBRARY_PATH" is only meant for paths to the library files, not for specifying the paths to the files themselves. So, for the library file itself ("libz.so"), the correct way to do this is: Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/zlib/lib Code:
export C_INCLUDE_PATH=/path/to/zlib/include export CPLUS_INCLUDE_PATH=/path/to/zlib/include If this doesn't work, then you can try another quick hack:
Code:
echo "$FOAM_SRC/OpenFOAM/lnInclude/" echo "$WM_THIRD_PARTY_DIR/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-$WM_ARCH_OPTION" Bruno
__________________
|
|
June 11, 2013, 04:59 |
|
#3 | |
New Member
wuyu
Join Date: Mar 2010
Posts: 27
Rep Power: 16 |
This really works.
I tried the first option and it works. So I did not go further. Thank you, Bruno. Quote:
|
||
July 30, 2020, 10:32 |
|
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
This did not work for me. However as it might be helpful to others, the following did work:
Installing zlib Code:
./configure --prefix=/path/to/zlib-1.2.11/ make make install Code:
export PATH=$PATH:/path/to/zlib-1.2.11/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/zlib-1.2.11/lib/ export LIBRARY_PATH=$LIBRARY_PATH:/path/to/zlib-1.2.11/lib/ export C_INCLUDE_PATH=/path/to/zlib-1.2.11/include/ export CPLUS_INCLUDE_PATH=/path/to/zlib-1.2.11/include/ export PKG_CONFIG_PATH=/path/to/zlib-1.2.11/lib/pkgconfig |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to solve large scale problem | send1000 | ANSYS | 0 | September 3, 2011 13:46 |
how to solve a problem involving both laminar and turbulent flow | seefd | FLUENT | 1 | June 3, 2011 03:20 |
Someone use Icepak to solve microchannel problem ? | Bernie | FLUENT | 1 | October 31, 2006 14:29 |
extremely simple problem... can you solve it properly? | Mikhail | Main CFD Forum | 40 | September 9, 1999 09:11 |
use of MAC method to solve sloshing problem. | S.R.SAHI | Main CFD Forum | 1 | April 15, 1999 22:28 |