Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing on centos 7 #1009

Open
BarnameESF opened this issue May 23, 2023 · 2 comments
Open

Error while installing on centos 7 #1009

BarnameESF opened this issue May 23, 2023 · 2 comments

Comments

@BarnameESF
Copy link

BarnameESF commented May 23, 2023

Hello
I want to install RedisJSON on centos 7 operating system, but unfortunately I encounter the following error. What should I do ?

`[root@static RedisJSON]# cargo build --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /root/RedisJSON/redis_json/Cargo.toml
workspace: /root/RedisJSON/Cargo.toml
Compiling proc-macro2 v1.0.56
Compiling unicode-ident v1.0.8
Compiling quote v1.0.27
Compiling libc v0.2.144
Compiling autocfg v1.1.0
Compiling memchr v2.5.0
Compiling cfg-if v1.0.0
Compiling thiserror v1.0.40
Compiling log v0.4.17
Compiling glob v0.3.1
Compiling serde v1.0.163
Compiling prettyplease v0.2.5
Compiling getrandom v0.1.16
Compiling ucd-trie v0.1.5
Compiling minimal-lexical v0.2.1
Compiling hashbrown v0.12.3
Compiling serde_json v1.0.96
Compiling cc v1.0.79
Compiling libloading v0.7.4
Compiling bindgen v0.65.1
Compiling either v1.8.1
Compiling itoa v1.0.6
Compiling lazy_static v1.4.0
Compiling ryu v1.0.13
Compiling once_cell v1.17.1
Compiling regex-syntax v0.7.1
Compiling syn v1.0.109
Compiling num-traits v0.2.15
Compiling indexmap v1.9.3
Compiling memoffset v0.7.1
Compiling clang-sys v1.6.1
Compiling num-integer v0.1.45
Compiling aho-corasick v1.0.1
Compiling nom v7.1.3
Compiling syn v2.0.16
Compiling rustc-hash v1.1.0
Compiling lazycell v1.3.0
Compiling bitflags v1.3.2
Compiling shlex v1.1.0
Compiling rustversion v1.0.12
Compiling peeking_take_while v0.1.2
Compiling unicode-xid v0.0.4
Compiling synom v0.11.3
Compiling backtrace v0.3.67
Compiling ppv-lite86 v0.2.17
Compiling gimli v0.27.2
Compiling quote v0.3.15
Compiling num_cpus v1.15.0
Compiling which v4.4.0
Compiling dashmap v4.0.2
Compiling rand_core v0.5.1
Compiling regex v1.8.1
Compiling adler v1.0.2
Compiling miniz_oxide v0.6.2
Compiling rand_chacha v0.2.2
Compiling cexpr v0.6.0
Compiling num-traits v0.1.43
Compiling syn v0.11.11
Compiling time v0.1.45
Compiling object v0.30.3
Compiling rustc-demangle v0.1.23
Compiling pin-utils v0.1.0
Compiling heck v0.4.1
Compiling static_assertions v1.1.0
Compiling iana-time-zone v0.1.56
Compiling addr2line v0.19.0
Compiling chrono v0.4.24
Compiling nix v0.26.2
Compiling rand v0.7.3
Compiling md5 v0.6.1
Compiling enum-primitive-derive v0.1.2
Compiling hex v0.3.2
Compiling linked-hash-map v0.5.6
Compiling bitflags v2.3.1
Compiling byteorder v1.4.3
Compiling itertools v0.10.5
Compiling strum_macros v0.24.3
Compiling redis-module-macros-internals v2.0.3
Compiling thiserror-impl v1.0.40
Compiling serde_derive v1.0.163
Compiling linkme-impl v0.3.9
Compiling linkme v0.3.9
Compiling pest v2.6.0
Compiling redis-module v2.0.3
Compiling pest_meta v2.6.0
Compiling pest_generator v2.6.0
Compiling pest_derive v2.6.0
error: failed to run custom build command for redis-module v2.0.3

Caused by:
process didn't exit successfully: /root/RedisJSON/target/release/build/redis-module-64c6403c25f5554c/build-script-build (exit status: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src/include/" "-Wall" "-Wextra" "-DREDISMODULE_EXPERIMENTAL_API" "-o" "/root/RedisJSON/target/release/build/redis-module-c317dac33f06c561/out/src/redismodule.o" "-c" "src/redismodule.c"
exit status: 0
cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
AR_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
AR_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
ARFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
ARFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
running: ZERO_AR_DATE="1" "ar" "cq" "/root/RedisJSON/target/release/build/redis-module-c317dac33f06c561/out/libredismodule.a" "/root/RedisJSON/target/release/build/redis-module-c317dac33f06c561/out/src/redismodule.o"
exit status: 0
running: "ar" "s" "/root/RedisJSON/target/release/build/redis-module-c317dac33f06c561/out/libredismodule.a"
exit status: 0
cargo:rustc-link-lib=static=redismodule
cargo:rustc-link-search=native=/root/RedisJSON/target/release/build/redis-module-c317dac33f06c561/out

--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.', 'libclang-.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.65.1/lib.rs:603:31
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
`

@gkorland
Copy link
Contributor

It seems like something is wrong with your env' or Rust install

Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.', 'libclang-.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.65.1/lib.rs:603:31

@jdspugh
Copy link

jdspugh commented Nov 15, 2023

On Ubuntu I had a similar error and had to do:

$ sudo apt install build-essential llvm clang

You will need to do the equivalent on CentOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants