I'm using ubuntu 2.6.38 and installed Neuron from the 32 bit deb file. When trying to compile mod files from another model, I get the following error:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [libnrnmech.la] Error 1
I have been searching the forums but can't really find anything that helps much. Does anyone know what the problem could be?
Thanks!
nrnivmodl compiling in Linux
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: nrnivmodl compiling in Linux
Use your distribution's package manager to discover and install the package(s) that it needs for development or compilation of programs that use ncurses.
A comment: despite its general excellence in most other areas, Ubuntu has been the principal source of questions like this. For some reason or other, it doesn't offer users a simple option like "install everything I need to develop and compile programs written in C or C++."
A comment: despite its general excellence in most other areas, Ubuntu has been the principal source of questions like this. For some reason or other, it doesn't offer users a simple option like "install everything I need to develop and compile programs written in C or C++."
Re: nrnivmodl compiling in Linux
In ubuntu it is convenient to use synaptic as a package manager. If you don't have it you can add it with a command like
When I used synaptic to discover what was missing (I typed ncurses in the synaptic search box when i received the ncurses missing message) I cured the problem by installing libncurses5-dev (in synaptic you can mark it for install and then apply).
Code: Select all
sudo apt-get install synaptic
-
- Posts: 14
- Joined: Sun Apr 24, 2011 11:35 pm
Re: nrnivmodl compiling in Linux
Dear Tom, what if it is opensuse 13.1? I too get the same error on lncurses.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: nrnivmodl compiling in Linux
Use your distribution's package manager to discover and install the package(s) that it needs for development or compilation of programs that use ncurses.
Re: nrnivmodl compiling in Linux
Hi usually when I get this problem in a new computer (ubuntu) I do the following:
Code: Select all
sudo apt-get install libncurses-dev
Re: nrnivmodl compiling in Linux
I needed this as well (Ubuntu 18.04 LTS):
For some reason synaptic didn't pick this up.
Code: Select all
sudo apt-get install gcc
Re: nrnivmodl compiling in Linux
If anyone gets here running NEURON with a miniconda installation, this is why it is happening and how to solve it:
Your default gcc may be on the miniconda path (/path/to/miniconda/bin), and it will look in your miniconda path for libraries, too (/path/to/miniconda/lib). apt-get won't install the ncurses libraries there, and miniconda's gcc won't look to where it does install. But you can do:
And then run nrnivmodl as:
and then nrnivmodl will find the ncurses libraries and your mod files should compile.
Your default gcc may be on the miniconda path (/path/to/miniconda/bin), and it will look in your miniconda path for libraries, too (/path/to/miniconda/lib). apt-get won't install the ncurses libraries there, and miniconda's gcc won't look to where it does install. But you can do:
Code: Select all
conda install -c anaconda ncurses
Code: Select all
nrnivmodl -loadflags "-L/path/to/miniconda/lib"
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: nrnivmodl compiling in Linux
Thanks, rgerkin. Installation and configuration tips are always welcome.