tkn-tub / veins-gym

Reinforcement Learning-based VANET simulations
https://www2.tkn.tu-berlin.de/software/veins-gym/
GNU General Public License v2.0
53 stars 8 forks source link

/usr/bin/ld: /usr/local/lib/libprotobuf.a(gzip_stream.cc.o): undefined reference to symbol 'inflateEnd' #9

Closed yzy26353520 closed 2 years ago

yzy26353520 commented 2 years ago

I would like to share my experience of failed installation by snakemake -jall

Environment

ubuntu 22 LTS protoc 3.20.0,3.20.1,3.21.1

pip show protobuf 
Version: 3.20.1

The first error in snakemake -jall :

/usr/bin/ld: /usr/local/lib/libprotobuf.a(gzip_stream.cc.o): undefined reference to symbol 'inflateEnd'

What I did:

  1. copy files in protoc-3.20.1-linux-x86_64.zip to the sub folder in /usr/(sub folders)
  2. protobuf-3.21.1/python$ pip install .
  3. protobuf-3.21.1/cmake$ cmake .
    protobuf-3.21.1/cmake$ make -j12
    protobuf-3.21.1/cmake$ sudo make install
  4. See .drone.yml and sudo apt-get --allow-releaseinfo-change update && sudo apt-get install -y python3-pip python3-wheel protobuf-compiler libprotobuf-dev libzmq3-dev

    The second error in snakemake -jall :

    error This file was generated by a newer version of protoc which is

Correct installation method

Because 2 versions of protoc are installed, one of which is installed through the .drone.yml statement. So Firstly sudo apt remove libprotobuf-dev protobuf-compiler-grpc Download protobuf-all-21.1.tar.gz unzip Open protobuf-3.21.2/src/README.md We can see in document like this:

     ./configure
     make -j$(nproc) # $(nproc) ensures it uses all cores for compilation
     make check
     sudo make install
     sudo ldconfig # refresh shared library cache.

Delete serpentine-env-master folder and re-extract serpentine-env-master.zip Maybe very important but easily overlooked is the last sentence "sudo ldconfig". Calm down and read the README is very important

dbuse commented 2 years ago

Thanks. I'll close this for now, but the your experience will be discoverable through github search.