CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   2.1.1 on ubuntu 11.10 (

ollebapur December 30, 2013 23:44

2.1.1 on ubuntu 11.10
Hi!! I am new to OpenFOAM, and I want to get it set up before the beginning of next semester. I am following the instructions on:

It seems to be going well, until I have to modify the bashrc file, since I can't open it from the terminal, and if I open it manually, I'm not able to add the line "source /opt/openfoam211/etc/bashrc" at the end of the file (saying I don't have permission to do so).


ruben@ruben-VirtualBox:~$ VERS=$(lsb_release -cs)     
ruben@ruben-VirtualBox:~$ sudo sh -c "echo deb $VERS main > /etc/apt/sources.list.d/openfoam.list"
ruben@ruben-VirtualBox:~$ sudo apt-get update
Ign oneiric InRelease
Ign oneiric InRelease                     
Ign oneiric-security InRelease           
Hit oneiric Release.gpg                   
Ign oneiric InRelease                 
Ign oneiric-updates InRelease         
Ign oneiric-backports InRelease       
Hit oneiric-security Release.gpg         
Ign oneiric Release.gpg                     
Hit oneiric Release                       
Hit oneiric Release.gpg                         
Hit oneiric-security Release                       
Ign oneiric Release                                   
Hit oneiric-updates Release.gpg                 
Hit oneiric/main Sources                             
Ign oneiric/main amd64 Packages/DiffIndex             
Hit oneiric-security/main Sources       
Hit oneiric-backports Release.gpg     
Hit oneiric/main amd64 Packages                     
Hit oneiric/main i386 Packages                       
Ign oneiric/main TranslationIndex                   
Hit oneiric-security/restricted Sources           
Hit oneiric-security/universe Sources   
Hit oneiric-security/multiverse Sources 
Hit oneiric-security/main amd64 Packages 
Hit oneiric-security/restricted amd64 Packages     
Ign oneiric/main i386 Packages/DiffIndex             
Ign oneiric/main TranslationIndex                     
Hit oneiric Release                             
Hit oneiric-security/universe amd64 Packages       
Hit oneiric-security/multiverse amd64 Packages     
Hit oneiric-security/main i386 Packages           
Hit oneiric-security/restricted i386 Packages     
Hit oneiric-security/universe i386 Packages       
Hit oneiric-security/multiverse i386 Packages     
Hit oneiric-security/main TranslationIndex         
Hit oneiric-updates Release                     
Hit oneiric-security/multiverse TranslationIndex   
Hit oneiric-security/restricted TranslationIndex   
Hit oneiric-security/universe TranslationIndex     
Hit oneiric-backports Release                   
Hit oneiric-security/main Translation-en           
Hit oneiric/main Sources                         
Hit oneiric/restricted Sources                   
Hit oneiric/universe Sources                     
Hit oneiric/multiverse Sources                   
Hit oneiric-security/multiverse Translation-en     
Hit oneiric-security/restricted Translation-en     
Hit oneiric-security/universe Translation-en
Hit oneiric/main amd64 Packages       
Hit oneiric/restricted amd64 Packages 
Hit oneiric/universe amd64 Packages   
Hit oneiric/multiverse amd64 Packages 
Hit oneiric/main i386 Packages         
Hit oneiric/restricted i386 Packages   
Hit oneiric/universe i386 Packages     
Hit oneiric/multiverse i386 Packages   
Hit oneiric/main TranslationIndex     
Hit oneiric/multiverse TranslationIndex
Hit oneiric/restricted TranslationIndex
Hit oneiric/universe TranslationIndex 
Hit oneiric-updates/main Sources       
Hit oneiric-updates/restricted Sources 
Hit oneiric-updates/universe Sources   
Hit oneiric-updates/multiverse Sources 
Hit oneiric-updates/main amd64 Packages
Ign oneiric/main Translation-en_US         
Hit oneiric-updates/restricted amd64 Packages
Hit oneiric-updates/universe amd64 Packages
Hit oneiric-updates/multiverse amd64 Packages
Ign oneiric/main Translation-en
Hit oneiric-updates/main i386 Packages
Hit oneiric-updates/restricted i386 Packages
Hit oneiric/main amd64 Packages
Hit oneiric-updates/universe i386 Packages
Hit oneiric-updates/multiverse i386 Packages
Hit oneiric-updates/main TranslationIndex
Hit oneiric-updates/multiverse TranslationIndex
Hit oneiric/main i386 Packages
Hit oneiric-updates/restricted TranslationIndex
Hit oneiric-updates/universe TranslationIndex
Hit oneiric-backports/main Sources
Hit oneiric-backports/restricted Sources
Hit oneiric-backports/universe Sources
Hit oneiric-backports/multiverse Sources
Hit oneiric-backports/main amd64 Packages
Hit oneiric-backports/restricted amd64 Packages
Hit oneiric-backports/universe amd64 Packages
Hit oneiric-backports/multiverse amd64 Packages
Hit oneiric-backports/main i386 Packages
Hit oneiric-backports/restricted i386 Packages
Hit oneiric-backports/universe i386 Packages
Hit oneiric-backports/multiverse i386 Packages
Hit oneiric-backports/main TranslationIndex
Hit oneiric-backports/multiverse TranslationIndex
Hit oneiric-backports/restricted TranslationIndex
Hit oneiric-backports/universe TranslationIndex
Hit oneiric/main Translation-en
Hit oneiric/multiverse Translation-en
Hit oneiric/restricted Translation-en
Hit oneiric/universe Translation-en
Hit oneiric-updates/main Translation-en
Ign oneiric/main Translation-en_US
Hit oneiric-updates/multiverse Translation-en
Hit oneiric-updates/restricted Translation-en
Hit oneiric-updates/universe Translation-en
Hit oneiric-backports/main Translation-en
Ign oneiric/main Translation-en
Hit oneiric-backports/multiverse Translation-en
Hit oneiric-backports/restricted Translation-en
Hit oneiric-backports/universe Translation-en
Reading package lists... Done
ruben@ruben-VirtualBox:~$ sudo apt-get install openfoam211
Reading package lists... Done
Building dependency tree     
Reading state information... Done
openfoam211 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 445 not upgraded.
ruben@ruben-VirtualBox:~$ sudo apt-get install paraviewopenfoam3120 Reading package lists... Done
Building dependency tree     
Reading state information... Done
paraviewopenfoam3120 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 445 not upgraded.
ruben@ruben-VirtualBox:~$ gedit ~/.bashrc

Any idea of what am I doing wrong? Suggestions?
To those who read this, happy new year 2014!


wyldckat December 31, 2013 13:17

Greetings Ruben and welcome to the forum!

Many thanks for sharing the output from your command line, along with a detailed description, since that makes it a lot easier to figure out what's going on!

The first issue might be that gedit from the command line doesn't work very well when Ubuntu is using the Unity desktop :(

If you don't have permissions to edit the file "~/.bashrc", when you browse manually with the text editor, it might be due to one of the two possible situations:
  1. The file "~/.bashrc" is the same as "$HOME/.bashrc", so if you run:

    echo $HOME/.bashrc
    You'll see the correct path. If the file on that path is not the file you are trying to edit, than that's the problem.
  2. The other possibility is if you edited the correct file, but while using the sudo command, which might have changed the ownership of the file. If this is the case, run:

    sudo chown $USER:$USER ~/.bashrc
    This will return the ownership to your user-name. Now you can edit the file with the "Text Editor".
Best regards,

ollebapur January 17, 2014 05:18

Thanks for such a quick reply, and sorry for my late response. Tried your solution last week and was busy packing and sorting other things.

What you proposed actually worked! I went with the change of ownership, was able to run the "icoFoam -help" , run a project and view it in paraFOAM :)

I'll be starting my thesis project next week, so I guess there will be more questions coming up in the future!

Greetings from Copenhagen

All times are GMT -4. The time now is 13:17.