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

[OpenFOAM.org] Problems installing OpenFOAM 2.3.0 on Ubuntu 12.04

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By arieljeds

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2015, 07:56
Default Problems installing OpenFOAM 2.3.0 on Ubuntu 12.04
  #1
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Hi everyone,

So I have found other people asking this but I have yet to find an answer I understand...

Ok this is very frustrating.. I am trying to reinstall OpenFOAM with a different version than what I had before (I had 2.3.1 before and am now trying to install 2.3.0).. As far as I can tell, I had removed all of the previous version of OpenFOAM before trying to do this. I am following the instructions here:

http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04

When I get to this line:
Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
I get the following output:
Code:
bash: /opt/OpenFOAM-2.3.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.3.0/etc/config/settings.sh: No such file or directory
bash: /opt/OpenFOAM-2.3.0/etc/config/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-2.3.0/bin/foamCleanPath: No such file or directory
I am installing OpenFOAM into the directory /home/ariel/OpenFOAM (it is showing up here and nowhere else)... I am so so confused why it is trying to find it in [CODE]/opt/[CODE]. I checked the bashrc file (OpenFOAM/OpenFOAM-2.3.0/etc/bashrc) and it looks like this:


Code:
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
#
# either set $FOAM_INST_DIR before sourcing this file or set
# 'foamInstall' below to where OpenFOAM is installed
#
# Location of the OpenFOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT
# foamInstall=~$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT
#
# END OF (NORMAL) USER EDITABLE PART

I am getting desperate at this stage, I have no idea what the problem is. I did this before with version 2.3.1 following the same instructions for that version and it worked perfectly. Please help! I am so confused!

Thank you and I really really really appreciate any advice on this
arieljeds is offline   Reply With Quote

Old   August 19, 2015, 08:22
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
Greetings Ariel,

The problem is that you still have a working OpenFOAM shell environment from the previous installation.
This wiki page details a lot on this topic: http://openfoamwiki.net/index.php/In...with_the_Shell - this page is mentioned at the top of the page of those instructions you've indicated.

Nonetheless, the steps you're probably missing are:
  1. Edit the file "~/.bashrc".
  2. Near the end of that file, there should be some lines that refer to the installation you had in "/opt". Delete those lines.
  3. Save and close the file (in the editor).
  4. Start a new terminal window or tab.
  5. Now you can activate the shell environment for the installation you're trying to perform. I.e, do again step #6 from those instructions, namely http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 19, 2015, 08:27
Default
  #3
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Hi Bruno,

Thanks a lot for getting back to me. This was what I suspected as well at the beginning of my problems but I removed all reference to OpenFOAM from the ~/.bashrc file, saved, closed it, and did a sudo apt-get update as well but same problem.

I was assuming that I had another version of OpenFOAM hiding somewhere but I can't find it and dont' seem to have another one anywhere.

Also, perhaps this is related but every time I open a new terminal now, the first line is:

Code:
of230: command not found
I am so confused about this because I can't see any reference at all to /opt/ or OpenFOAM even so I don't know how to find the rogue version...

If you have any more advice on this, I'd be really appreciative.

Thanks again for the message

Ariel
arieljeds is offline   Reply With Quote

Old   August 19, 2015, 08:30
Default
  #4
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 Ariel,

Please post the content of your file "~/.bashrc", so that I can see what you have inside that file.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 19, 2015, 08:31
Default
  #5
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Hi Bruno,

No problem. The ~/.bashrc file is:

Code:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'
of230
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
Best,
Ariel
arieljeds is offline   Reply With Quote

Old   August 19, 2015, 08:33
Default
  #6
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Ooops, I just found the of230 problem! There's one floating in there... hopefully this fixes everything else too!
arieljeds is offline   Reply With Quote

Old   August 19, 2015, 08:39
Default
  #7
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 11
arieljeds is on a distinguished road
Just to confirm: after many hours of searching and frustrating, this did seem to be the problem...

Thanks for pointing me to the right file, just had to search harder
wyldckat likes this.
arieljeds is offline   Reply With Quote

Reply

Tags
bashrc, installation of openfoam, openfoam 2.3.0, ubuntu 12.04


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
[OpenFOAM.org] Problems installing OpenFOAM 2.4.0 on Ubuntu 16.04 donminoti OpenFOAM Installation 13 January 13, 2021 18:07
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
[OpenFOAM.org] Problem in installing OpenFOAM 2.3.0 !!! omid20110 OpenFOAM Installation 6 August 1, 2016 12:20
[foam-extend.org] error installing foam extend 1.6 in ubuntu 12.04 christos OpenFOAM Installation 1 May 9, 2016 18:20
Problems installing SVN in Ubuntu (for later installing PyFoam for OpenFOAM) immortality Lounge 2 May 24, 2014 04:05


All times are GMT -4. The time now is 06:21.