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.

1
  • 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, 2013 at 6:47

3 Answers 3

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
  • Also, just to note that I also had to manually remove the package metadata from /var/lib/dpkg/status after installing to clear up the dependency mess that forcing install made, as APT wanted to get rid of it. Nov 29, 2013 at 9:47
  • +1 thanks! this installed libg2c0 on my ubuntu 14.04 system
    – samsamara
    Aug 7, 2015 at 9:08
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

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.