Parity-ethereum: Parity Ethereum - Unable to install in CentOS 7

Created on 20 Jun 2019  Â·  11Comments  Â·  Source: openethereum/parity-ethereum

  • Parity Ethereum version: Tried with both 2.4.7-stable and 2.5.2-beta
  • Operating system: CentOS Linux release 7.6.1810 (Core)
  • Installation: binary
  • Fully synchronized:
  • Network:
  • Restarted: yes

Case 1 (Using binary):

Steps to reproduce:

1.) wget https://releases.parity.io/ethereum/v2.5.2/x86_64-unknown-linux-gnu/parity
2.) chmod u+x parity
3.) ./parity --help

Expected Behavior:
It should show the expected output.

Actual Behavior:
./parity: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./parity) ./parity: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./parity) ./parity: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./parity) ./parity: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./parity)

If I will add below in ~/.bashrc:
export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH

Running ./parity --help will then output:
./parity: /lib64/libc.so.6: version GLIBC_2.18 not found (required by ./parity)

O/P of strings:
```$ strings /lib64/libc.so.6 | grep GLIBC_2.18
$ strings /lib64/libc.so.6 | grep GLIBC_2.17
GLIBC_2.17
GLIBC_2.17

I installed `glibc2.18` manually in a separate folder and used patchelf:

$ patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 --set-rpath /opt/glibc-2.18/ ./parity
$ ./parity --help
./parity: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

Case 2 (build from source):
- **Rustc version**: rustc 1.35.0 (3c235d560 2019-05-20)
- **Cargo version**: cargo 1.35.0 (6f3e9c367 2019-04-04)
- **Rustup version**: rustup 1.18.3 (435397f48 2019-05-22)
- **Operating system**: CentOS Linux release 7.6.1810 (Core)
- **Installation**: Build from source
- **Parity Ethereum version**: Tried with both stable and beta

Steps to reproduce:

$ git clone https://github.com/paritytech/parity-ethereum
$ cd parity-ethereum
$ git checkout stable
$ cargo clean
$ rm -rf ~/.cargo/registry
$ cargo build --release --features final

**expected behavior**
An executable should have produced in the ./target/release subdirectory.

**actual behavior**

error: linking with cc failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/wnetpower/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/deps/parity-a49aec31b5155c9d.parity.5mf8thvv-cgu.9.rcgu.o" "-o" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/deps/parity-a49aec31b5155c9d" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/deps" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/eth-secp256k1-ba0eba20cc73a5dd/out" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/clear_on_drop-0e2e367cdb1243dd/out" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/jemalloc-sys-324652acd45faa04/out/build/lib" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/backtrace-sys-19347f4a6c4b4969/out" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/ring-6b5dd19e2bbb6a38/out" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/parity-rocksdb-sys-7418184d5c20656a/out/build" "-L" "/home/wnetpower/cryptoDisk4/parity_eth/parity-ethereum/target/release/build/parity-snappy-sys-d042bd653d3b6127/out/build" "-L" "/home/wnetpower/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcIRKgeR/libparity_rocksdb_sys-1588b5563e59fa0a.rlib" "/tmp/rustcIRKgeR/libparity_snappy_sys-302878395c0faff9.rlib" "/tmp/rustcIRKgeR/libring-f3ee4bb9e59e927b.rlib" "/tmp/rustcIRKgeR/libsecp256k1-3d4749ac50ffb5c6.rlib" "/tmp/rustcIRKgeR/libbacktrace_sys-c7f39d7cc586bb47.rlib" "/tmp/rustcIRKgeR/libjemalloc_sys-444903b6aba03bba.rlib" "-Wl,--start-group" "/tmp/rustcIRKgeR/libbacktrace_sys-1059e0ba7f05fd67.rlib" "-Wl,--end-group" "/home/wnetpower/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-566972fa63f867ee.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lstdc++" "-lpthread" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
```

Complete error Pastebin link:
1_parity_eth_cargo_build_error_centos_7
2_parity_eth_cargo_build_error_centos_7
3_parity_eth_cargo_build_error_centos_7

Any ideas?

Most helpful comment

Had this issue too. After alot of hacking we were able to make it work by smashing all these dependnencies on it

 sudo yum install -y openssl libssl-devel \
            libudev-devel openssl-devel git gcc gcc-c++  \
            curl kernel-devel systemd-devel git make gcc-c++ gcc file binutils gtk+-devel
            sudo yum install -y glibc.i686
            sudo yum install -y zlib.i686
            sudo yum install -y fontconfig freetype freetype-devel fontconfig-devel libstdc++
            sudo yum install -y libfontconfig.so.1
            sudo yum install -y libstdc++.so.6
            sudo yum install -y wget
            sudo yum install -y openssl-devel.x86_64

            sudo yum reinstall -y openssl

            cd /usr/src && cd /usr/src
            wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
            tar -zxf openssl-1.0.2-latest.tar.gz
            cd openssl-1.0.2p
            ./config
            install gcc -y
            make && make install

            sudo ln -sf /usr/lib64/libssl.so /usr/lib64/libssl.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0

            sudo yum group mark install -y \"Development Tools\";
            sudo yum group mark convert -y \"Development Tools\";

All 11 comments

Are you sure you have libudev installed?

@dvdplm Yes, here is the output:

$ ls -l /lib64/libudev.so.1
lrwxrwxrwx. 1 root root 16 Jun 19 11:47 /lib64/libudev.so.1 -> libudev.so.1.6.2

@lazaridiscom Thanks for your input. I went through the above given link and other similar answers in google.

As I'm not used to C language, I don't know which file to edit for -D_GLIBCXX_USE_CXX11_ABI=0. So I used RUSTFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" cargo build --release --features final --verbose but that resulted in error:

Running `rustc --crate-name cfg_if /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=d1ee4b25153291f2 -C extra-filename=-d1ee4b25153291f2 --out-dir /home/user/folder1/parity_eth3/parity-ethereum/target/release/deps -L dependency=/home/user/folder1/parity_eth3/parity-ethereum/target/release/deps --cap-lints allow -D_GLIBCXX_USE_CXX11_ABI=1`
error[E0602]: unknown lint: `_GLIBCXX_USE_CXX11_ABI=1`
  |
  = note: requested on the command line with `-D _GLIBCXX_USE_CXX11_ABI=1`

So, I assume that is not right place/way to use _GLIBCXX_USE_CXX11_ABI option.

Can you pls help a bit about its usage?

Thanks.

Had this issue too. After alot of hacking we were able to make it work by smashing all these dependnencies on it

 sudo yum install -y openssl libssl-devel \
            libudev-devel openssl-devel git gcc gcc-c++  \
            curl kernel-devel systemd-devel git make gcc-c++ gcc file binutils gtk+-devel
            sudo yum install -y glibc.i686
            sudo yum install -y zlib.i686
            sudo yum install -y fontconfig freetype freetype-devel fontconfig-devel libstdc++
            sudo yum install -y libfontconfig.so.1
            sudo yum install -y libstdc++.so.6
            sudo yum install -y wget
            sudo yum install -y openssl-devel.x86_64

            sudo yum reinstall -y openssl

            cd /usr/src && cd /usr/src
            wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
            tar -zxf openssl-1.0.2-latest.tar.gz
            cd openssl-1.0.2p
            ./config
            install gcc -y
            make && make install

            sudo ln -sf /usr/lib64/libssl.so /usr/lib64/libssl.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0

            sudo yum group mark install -y \"Development Tools\";
            sudo yum group mark convert -y \"Development Tools\";

@prashant-1926 was @Genysys's comment helpful?

@seunlanlege Yes, using @Genysys solution, though it was showing same error error: linking with cc failed: exit code: 1 in existing machine, it compiled well on a clean CentOS 7 minimal install. However it was throwing error on execution:

# ./parity --no-warp --pruning archive --cache-size=8192
2019-07-01 00:12:17  Starting Parity-Ethereum/v2.6.0-nightly-e53bf9a-20190628/x86_64-linux-gnu/rustc1.35.0
2019-07-01 00:12:17  Keys path /root/.local/share/io.parity.ethereum/keys/ethereum
2019-07-01 00:12:17  DB path /root/.local/share/io.parity.ethereum/chains/ethereum/db/906a34e69aec8c0d
2019-07-01 00:12:17  State DB configuration: archive
2019-07-01 00:12:17  Operating mode: active
2019-07-01 00:12:17  Configured for Ethereum using Ethash engine
2019-07-01 00:12:18  Listening for new connections on 127.0.0.1:8546.
2019-07-01 00:12:18  Removed existing file '/root/.local/share/io.parity.ethereum/jsonrpc.ipc'.
Illegal instruction

I tried again with git checkout beta. It compiled well and is running fine now:

# ./parity --no-warp --pruning archive --cache-size=8192
2019-07-01 02:19:34  Starting Parity-Ethereum/v2.5.3-beta-3fd58bd-20190625/x86_64-linux-gnu/rustc1.35.0
2019-07-01 02:19:34  Keys path /root/.local/share/io.parity.ethereum/keys/ethereum
2019-07-01 02:19:34  DB path /root/.local/share/io.parity.ethereum/chains/ethereum/db/906a34e69aec8c0d
2019-07-01 02:19:34  State DB configuration: archive
2019-07-01 02:19:34  Operating mode: active
2019-07-01 02:19:34  Configured for Ethereum using Ethash engine
2019-07-01 02:19:35  Listening for new connections on 127.0.0.1:8546.
2019-07-01 02:19:35  Removed existing file '/root/.local/share/io.parity.ethereum/jsonrpc.ipc'.
2019-07-01 02:19:37  Updated conversion rate to Ξ1 = US$295.88 (16094039 wei/gas)
2019-07-01 02:19:40  Syncing       #0 0xd4e5…8fa3     0.00 blk/s    0.0 tx/s    0.0 Mgas/s      0+    0 Qed        #0    3/25 peers   8 KiB chain
.
.
.
2019-07-01 02:58:13  Syncing  #335148 0xbbd3…150d   119.53 blk/s  123.9 tx/s    3.5 Mgas/s      0+    0 Qed   #335147    2/25 peers   204 MiB chain 7 MiB db 0 bytes queue 10 MiB sync  RPC:  0 conn,    0 req/s,    0 µs

Thank you @Genysys for sharing your solution.

archive is an illegal flag i.e it does not exist as a cli option..

it should be pruning=archive

https://wiki.parity.io/Configuring-Parity-Ethereum

--pruning=[METHOD]
        Configure pruning of the state/storage trie. METHOD may
        be one of auto, archive, fast: archive - keep all state
        trie data. No pruning. fast - maintain journal overlay.
        Fast but 50MB used. auto - use the method most recently
        synced or default to fast if none synced. (default:
        auto)

that why you got that error. Glad it worked.

Thanks for pointing it out. I'll give it a try.

However, I used pruning option from here: https://wiki.parity.io/Getting-Synced#database-pruning

Its confusing would be great to get clarity from the parity team as its implemented differently that the docs.. not sure why it would work in one version and not another

https://github.com/paritytech/parity-ethereum/blob/master/parity/cli/mod.rs#L869

@Genysys I don't think the illegal instruction seen here is at all related to command line flags - it looks more like a failed OS call or a corrupt binary

Had this issue too. After alot of hacking we were able to make it work by smashing all these dependnencies on it

 sudo yum install -y openssl libssl-devel \
            libudev-devel openssl-devel git gcc gcc-c++  \
            curl kernel-devel systemd-devel git make gcc-c++ gcc file binutils gtk+-devel
            sudo yum install -y glibc.i686
            sudo yum install -y zlib.i686
            sudo yum install -y fontconfig freetype freetype-devel fontconfig-devel libstdc++
            sudo yum install -y libfontconfig.so.1
            sudo yum install -y libstdc++.so.6
            sudo yum install -y wget
            sudo yum install -y openssl-devel.x86_64

            sudo yum reinstall -y openssl

            cd /usr/src && cd /usr/src
            wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
            tar -zxf openssl-1.0.2-latest.tar.gz
            cd openssl-1.0.2p
            ./config
            install gcc -y
            make && make install

            sudo ln -sf /usr/lib64/libssl.so /usr/lib64/libssl.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0
            sudo ln -sf /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1.0.0

            sudo yum group mark install -y \"Development Tools\";
            sudo yum group mark convert -y \"Development Tools\";

Full installation without the funky dependencies:
https://github.com/paritytech/parity-ethereum/issues/11291#issuecomment-560034022

For future reference & anyone else who stumbles across this same issue, you'll have to rebuild Parity from scratch using whichever version of GLIB's installed on the target machine, as the default build is incompatible with CentOS 7.x. However, cmake3 first has to be installed and modified in /usr/bin so that running 'cmake' launches 'cmake3'.

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install ./epel-release-latest-7.noarch.rpm
yum install cmake3
cd /usr/bin
cp cmake3 cmake

Now install the remaining dependencies as found at the below link. Also, I happened to install parity at the '/' directory:
https://github.com/paritytech/parity-ethereum/blob/master/README.md

curl https://sh.rustup.rs -sSf | sh
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> /root/.bashrc
source /root/.bashrc
cd /
git clone https://github.com/paritytech/parity-ethereum
cd parity-ethereum
cargo build --release --features final

Add parity to /usr/bin so you can run 'parity' from any directory within Terminal.

sudo ln -s /parity-ethereum/target/release/parity /usr/bin/parity

Was this page helpful?
0 / 5 - 0 ratings