2

I was trying to run

make 2D -j6 IN=2DPrograms/CD_2D_DirectSolver OUT=OUTPUT/cd.exe

command. While running this make file, the terminal rendered the following errors:

g++: error: EXT_LIB/g2c/libg2c_LINUX.so.0: No such file or directory

So I tried to install libg2c through the following command which did not work for me.

sudo apt-get install libg2c0

I am running Ubuntu 13.04-32 bit machine. It would great if somebody can help me with this.

Braiam
  • 67,791
  • 32
  • 179
  • 269
Denzil
  • 203
  • 3
  • 4
  • 8
  • Please edit your post with what you are trying to compile. That lib file is no longer in the repositories and looks to be deprecated as I see no mention of it since Hardy Heron (8.0.4) If there is a .deb package of what you are trying to install, it would be worth trying that. – douggro May 28 '13 at 06:47

3 Answers3

7

This worked for me:

wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/libg2c0_3.4.6-6ubuntu5_i386.deb
sudo dpkg -i --force-all libg2c0_3.4.6-6ubuntu5_i386.deb

I had to get it from an old release as it's no longer distributed with Ubuntu.

2

After changes in gcc, it's not been there since 8.04.1. gfortran is an alternative that you can look into.

For more details check out this link launchpad bug link

Projjol
  • 1,100
0

Download libf2c-3.4.4-2.fc3 package from the links below, two corresponding to 32 and 64 bits respectively, use one depending on your system type. If you want you can try newer versions from this link.

32 bit

64 bit

After downloading, open rpm file. I used this command:

alien --scripts --generate libf2c-3.4.4-2.fc3.x86_64.rpm

Find the two files of libg2c.so.0 and libg2c.so.0.0.0, and then execute the following command:

sudo mv libg2c.* /usr/lib

Restart, be sure to restart!

You can solve the error.

There are many solutions to this error, but I have tried them all, and I still feel that this is the simplest and most easy to use.

Source