View Full Version : Lammps 30Sep2011 on ununtu 11.04

February 21st, 2012, 12:10 PM
Hi Guys

do you know how to install Lammps 30Sep11 on ubuntu 11.04?

I followed these instructions which is in lammps site:

sudo apt-get install build-essential fftw-dev tcsh mpich2 gfortran

# for parallel binaries
make ubuntu

but after installing packages and write make ubuntu

I got an error :

/usr/bin/ld: cannot find -lcr
collect2: ld returned 1 exit status
make[1]: *** [../lmp_ubuntu] Error 1
make[1]: Leaving directory `../lammps-30Sep11/src/Obj_ubuntu'
make: *** [ubuntu] Error 2

Do you know what should I do?Should I install some packages for my PC?
My system: motherboard Gigabyte Z68XUD3

March 21st, 2012, 08:46 PM
Do you need that specific LAMMPS version? I have a Makefile for 17Feb12 version which seems to work on my Ubuntu machine (see the attachment).
The error "cannot find -lcr" means you don't have libcr.so installed on your system. Try installing libcr-dev:

sudo apt-get install libcr-dev

July 24th, 2012, 01:06 AM
Hi omidmd, i've just installed LAMMPS latest build, on my workstation. I had trouble installing it initially and received the same(?) looking error as you. I think my problem was that I was trying to install the parallel version, which required all the MPI libraries. From the manual there is an almost hidden "serial" install method towards the end of step 5 in Section 2.


"From the src directory, type "make stubs", or from the STUBS dir, type "make" and it should create a libmpi.a suitable for linking to LAMMPS."

Then instead of "make linux", try "make serial"

Of course, this was on my workstation for testing purposes. Installing on a cluster or high end multi-core machine is less trivial.