Install for ZDOCK in Debian 11

Page content

While using ZDOCK in Debian 11, an error message shew:

$ ./mark_sur
./mark_sur: error while loading shared libraries: cannot open shared object file: No such file or directory

libg2c is one of the components of the g77 in gcc version 3.4.x:

g77 consists of several components:

  • The libg2c run-time library. This library contains the machine code needed to support capabilities of the Fortran language that are not directly provided by the machine code generated by the g77 compilation phase.

    libg2c is just the unique name g77 gives to its version of libf2c to distinguish it from any copy of libf2c installed from f2c (or versions of g77 that built libf2c under that same name) on the system.

But in current Debian 11/bullseye, the g77 has been replaced by the package gfortran and no available.

The way to solve this problem is to download the libf2c package from, then extract the package, and copy the file to local library directory.

1. Download rpm packages:

2. Unpack rpm package:


Install rpm2cpio package if necessary:

$ sudo apt update
$ sudo apt install rpm2cpio
$ rpm2cpio libf2c-3.4.4-2.fc3.x86_64.rpm | cpio -idmv

It creates a usr/ directory in the current directory, the contents:

$ tree usr/
└── lib64
    ├── ->

3. Copy to library diretory:

In my computer, the local library directory is: $HOME/lib

$ cp usr/lib64/ $HOME/lib

Then edit ~/.bashrc file, append this line:


Reload the environment by

$ source ~/.bashrc

or simply logout then login, the mark_sur works.


  1. error while loading shared libraries: cannot open shared object的解决办法
  2. What is GNU Fortran?