CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM Installation on Debian-testing 64 bit (

Afacci June 26, 2012 19:05

OpenFOAM Installation on Debian-testing 64 bit
Hi everybody

I found an issue compiling openFOAM (both -2.x.x and -ext version) on a Debian-testing 64 bit system.
Some application (setSet for instance) were not correctly compiled because the "liblncurses5-dev" package was missing.
If anyone experiences the same problem installing "liblncurses5-dev" from Debian repository should fix if.


wyldckat June 27, 2012 15:25

Greetings Andrea,

The usual package that setSet uses and that needs to be installed on Debian and Ubuntu is either one of the following (source: ):


The package you mention is very likely one that also installs one of the packages above. Additionally, it's also possible that in the testing section of Debian there is a broken dependency which is only fixed by installing the package you've stated.

You should be able to ascertain if the packages I mentioned are installed or not in your system:

dpkg-query -l libreadline-dev libreadline5-dev libreadline6-dev
Additionally, I've checked online:
Maybe you've got a very old testing version of Debian?

Best regards,

Afacci June 27, 2012 16:27

Hy Wyldckat
Thank you for the feedback,

You're absolutely right the package "liblncurses5-dev" does not exist, I misspelled the name; the right package is "libncurses5-dev". I apologize about that.

All the packages You mentioned :
libreadline-dev libreadline5-dev libreadline6-devwere already installed on my system but trying to compile the setSet application gave me the following error

Found <readline/readline.h> -- enabling readline support.
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-2.0.1/src/meshTools/lnInclude -DHAS_READLINE -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/writePointSet.o Make/linux64GccDPOpt/writeFuns.o Make/linux64GccDPOpt/writePatch.o Make/linux64GccDPOpt/setSet.o -L/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib \
-lmeshTools -lreadline -lncurses -lOpenFOAM -ldl -lm -o /opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/setSet
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/setSet] Error 1

As You can see the GNU linker (ld) cannot find the lncurses. This was fixed installing the package "libncurses5-dev". I am pretty sure of this, I just double-checked on another Debian system.
Moreover the Debian-testing I'm using is the newest available and it is updated almost every day.

The list of packages You reported from is secifically designed to work for Ubuntu systems. I know that Ubuntu is based on Debian, nevertheless the dependency tree may be slightly different.
I guess, but I'm not sure that libncurses5-dev may be installed as a dependecy for one of the package You listed under Ubuntu.


wyldckat June 27, 2012 17:05

Hi Andrea,

Mmm... interesting... I've checked the dependency list and it seems that libreadline5 doesn't need libncurses, but libreadline6 (default for Ubuntu 11.10 when using libreadline) does need libncurses5 and is installed by default along with libreadline6.

So, maybe they fixed this dependency on Debian... here we go:
I'm going to see if I remember testing this on Ubuntu 12.04 next weekend, where this is very likely will also occur!
Mmm, some preliminary checking: - also doesn't depend on libncurses5...
Well, on OpenFOAM's official instructions, it doesn't say it supports 12.04 ;)... at least not at the time of this writing :D:

Nonetheless, I'll see if I give it a spin and cross-check your finding on Ubuntu 12.04 ;)

Best regards,

wyldckat June 30, 2012 17:54

Update: I've tested this in Ubuntu 12.04 and came to the same conclusion: the alias "libncurses-dev" or direct "libncurses5-dev" package has to be installed as well.

I've reported this here:

All times are GMT -4. The time now is 23:15.