This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Issues with installing 1.2 on Ubuntu

+1 vote

Hi guys, I hope this is the right place for some trouble-shooting and i would appreciate anybodys help for this fenics-newbie here.

I have been trying to run the latest version on a virtual machine Ubuntu 13.04.

First thing i did was to try the "sudo add-apt-repository ppa:fenics-packages/fenics" in the console, but unfortunately I get the error "Cannot access PPA(https://launchpad.net/api/1.0/~fenics-packages/+archive/fenics) to get PPA information, please check your internet connection" ... Since I am using a proxy, this might be one reason.

That´s when I manually added the line "deb http://ppa.launchpad.net/fenics-packages/fenics/ubuntu raring main " from the site https://launchpad.net/~fenics-packages/+archive/fenics into the PPA via the Software Centre.
Once I update in the shell "sudo apt-get update", it logically says that no key is available yet.

On the page (https://launchpad.net/api/1.0/~fenics-packages/+archive/fenics) it says that the key is "2B746472", yet when i search the ubuntu-keyserver, the latest key i find there is from Jan 2013 (http://keyserver.ubuntu.com/pks/lookup?op=vindex&search=fenics&fingerprint=on).

So each time I try to get a key, e.g. "sudo gpg --keyserver pgp.mit.edu --recv-keys 2B746472;" none is found....

Long story short, is it possible to run Fenics 1.2 on Ubuntu (seems like 1.1 is already accessable) and if so, how can i get Fenics 1.2 running on my ubuntu system?

closed with the note: This is a support request and not a suitable questions for a Q&A forum. Use the fenics-support@fenicsproject.org mailing list for installation support.
asked Jun 18, 2013 by raef FEniCS Novice (140 points)
closed Jun 20, 2013 by Garth N. Wells

Did you try without the ";" in the key?

Adding the FEniCS PPA will give you the latest stable release, which is 1.2.0.

thanks for your quick comment ... yes i did, unfortunately that does not help

This works for me:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2B746472

in my case it only says:

gpg: requesting key 2B746472 from hkp server keyserver.ubuntu.com
gpgkeys: key 2B746472 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

Well, I guess it's a problem with your connection since the key is on both pgp.mit.edu and on keyserver.ubuntu.com:

yeahhh you are most likely right ... I was able to add the key-file manually by copying the key-data from your link into a file fenics_key.txt and then calling "sudo apt-key add fenics_key.txt" in the shell ... the update works fine then

however, once I try to install fenics, the site "http://ppa.launchpad.net/fenics-packages/fenics/ubuntu " is giving me connection-headaches... even though it is accessable through my browser

seems like i am left to building it from source :(

i just wanted to add that a few packages are required if you want to install the final "dolphin" from source. This is not mentioned in http://fenicsproject.org/download/installation_from_source.html#installation-from-source but would be nice to know anyone trying to install it like that for the first time:
(Note: probably some of those packages are not needed ... i just copied and pasted it from people with similar errors together and at last the cmake . performed without major errors)

sudo apt-get install liblapack-dev
sudo apt-get install libblas-dev
sudo apt-get install libboost-dev
sudo apt-get install libarmadillo-dev
sudo apt-get install libopenexr6-dev
sudo apt-get install git cmake g++ zlib1g-dev libxml2-dev libfreetype6-dev libjpeg62-dev libpng3 libpng12-0-dev
sudo apt-get install libtiff4-dev swig python3-all-dev libopenexr-dev libilmbase6 libopenal1 libfftw3-3 
sudo apt-get install libqt4-dev qt4-dev-tools
sudo apt-get install libvtk5-dev python-vtk

Maybe you could once more mention after your installation that Fenics is a programming environment ... especially after trying for hours to get it installed it kinda helps to get reminded:

python
from dolfin import *

This could give you other errors. In my case even though numpy was already installed, it needed the following:

sudo apt-get install python-scitools
sudo apt-get install python-ply

And when I thought everything was resolved I ended up with the following error:

from dolfin import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/dolfin/__init__.py", line 16, in <module>
    import cpp
  File "/usr/local/lib/python2.7/dist-packages/dolfin/cpp/__init__.py", line 40, in <module>
    exec("import %s" % module_name)
  File "<string>", line 1, in <module>
ImportError: No module named common

Does anybody have any idea how to proceed from here?

We generally recommend to use Dorsal if you need to build FEniCS (and dependencies) from source. That should take care of most of the problems you mention here.

Please make a pull request on FEniCS Web if you feel information is missing on the web page.

thanks for the advice ... actually i did so but unfortunately the proxy-problem resurfaces - that´s why from source seemed the only way ... however, with this error i frankly have no idea how to move about it any further

So I set up ubuntu on the virtual machine again and after doing the normal update and upgrade directly moved to install ubuntu via "sudo apt-get install fenics" ... this is version 1.1 but hey, at least the Proxy did not interfere ... however this also ends up in missing a module:

from dolfin import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/dolfin/__init__.py", line 23, in <module>
    from dolfin.cppimports import *
  File "/usr/lib/python2.7/dist-packages/dolfin/cppimports.py", line 4, in <module>
    import dolfin.cpp as cpp
ImportError: No module named cpp

guess i will wait until the next windows build comes out ...

...