CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Trouble with installation - Current directory is not $WM_PROJECT_DIR (

dnaneet January 21, 2012 00:39

Trouble with installation - Current directory is not $WM_PROJECT_DIR
I understand that this error has been posted before in these forums but none of the solutions seem to help me.

I am trying to install OpenFOAM-2.1.0 from source on Ubuntu 11.10 and am running into the following error all the time:


./Allwmake: 9: wmakeCheckPwd: not found
Error: Current directory is not $WM_PROJECT_DIR
    The environment variables are inconsistent with the installation.
    Check the OpenFOAM entries in your dot-files and source them.

  • One of the problems I am encountering is that "echo $WM_RPOJECT_DIR" gives me NO output. What gives? How didn't I "install third party... correctly"
  • I am a newbie at linux so I'd appreciate it if your answers included some detail.


wyldckat January 21, 2012 14:59

Greetings Annet and welcome to the forum!

Well, if you want detail, then read this blog post of mine: Advanced tips for working with the OpenFOAM shell environment :)

Best regards,

dnaneet January 21, 2012 15:04

Dear Bruno Santos and other readers of this post,

I just about solved my problem

Here are the steps that I followed:

I resolved this issue by doing the following:

1) When trying to install/compile from source, make sure that you first tar xvf OpenFOAM-2.1.0.tgz into /home/-your-computer-user-name/OpenFOAM where the "OpenFOAM" is a folder that you create.

2)Make sure that you run all the installation steps in TO THE APOSTROPHE!!! That is very important.

3) Installation will take you about ~2hours or so to compile from source (give or take an hour based on your hardware.)

4)DO NOT install OpenFOAM-2.1.0 as root! This installs it in /opt and needs root to run it all the time.

Problem solved!

jiang_plum September 19, 2012 07:12

Hello,dnaneet other readers of this post,
When I follow the steps of ,and go to "Building the sources" part, I use "echo $WM_PROJECT_DIR ",nothing returns.What's the problem and what should I do?

Please help me, thank youu very much!

wyldckat September 19, 2012 17:03

Greetings jiang_plum and welcome to the forum!

You didn't mention which Linux distribution you're using, so I'll reply with what I've already written down... namely two tutorials on how to build OpenFOAM 2.1.1 from source:
These are very explicit on the steps one should take. Basically it tells every single command you need to run for things to install as intended ;)

Best regards,

jiang_plum September 21, 2012 04:02


First of all ,thanks for your reply. I install openfoam in a ubuntu system. When I open my laptop this afternoon and redo the" ./allwmake', it is going now.
So my question is how long will it take to finsh ./allwmake?

Best regards!

treima September 21, 2012 04:24


it can take some hours to finish the building process when you compile the things from source.

But for ubuntu systems, you can just install OpenFOAM as a deb-pack:

It dosenīt take so much time and the installation is very easy ;)


All times are GMT -4. The time now is 04:27.