You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let client = connect(format!("memcache://{}:{}?verify_mode=none", "localhost", "12321")).unwrap();
client.set("foo", "bar", 0).unwrap();
let value: Option<String> = client.get("foo").unwrap();
println!("{:?}", value);
then when I run: cargo build
error: linking with cc failed: exit status: 1= note: LC_ALL="C" PATH="/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" VSLANG="1033" "cc" "-m64" "/tmp/rustcarvLOT/symbols.o" "/home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/itachi/code/pelikan/target/release/deps" "-L" "/home/itachi/code/pelikan/target/release/build/boring-sys-d40d3f335e631a6a/out/build/" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcarvLOT/libboring_sys-82f14df4ffcf8e10.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d092fa2c0bdfc89c.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
= note: /usr/bin/ld: /home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o: in function openssl::ssl::connector::SslConnector::connect': memcache_proxy.1049eaaa4be7a3de-cgu.0:(.text._ZN7openssl3ssl9connector12SslConnector7connect17h12a3d9b65aef87acE+0x10f): undefined reference to SSL_ctrl'
/usr/bin/ld: /home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o: in function openssl_sys::openssl::ssl::SSL_CTX_set_mode': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.91/src/./ssl.rs:246: undefined reference to SSL_CTX_ctrl'
collect2: error: ld returned 1 exit status
= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the -l flag to specify native libraries to link
= note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
my code:
then when I run: cargo build
error: linking with
cc
failed: exit status: 1= note: LC_ALL="C" PATH="/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" VSLANG="1033" "cc" "-m64" "/tmp/rustcarvLOT/symbols.o" "/home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/itachi/code/pelikan/target/release/deps" "-L" "/home/itachi/code/pelikan/target/release/build/boring-sys-d40d3f335e631a6a/out/build/" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcarvLOT/libboring_sys-82f14df4ffcf8e10.rlib" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d092fa2c0bdfc89c.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"= note: /usr/bin/ld: /home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o: in function
openssl::ssl::connector::SslConnector::connect': memcache_proxy.1049eaaa4be7a3de-cgu.0:(.text._ZN7openssl3ssl9connector12SslConnector7connect17h12a3d9b65aef87acE+0x10f): undefined reference to
SSL_ctrl'/usr/bin/ld: /home/itachi/code/pelikan/target/release/deps/memcache_proxy-062c071115dcfb42.memcache_proxy.1049eaaa4be7a3de-cgu.0.rcgu.o: in function
openssl_sys::openssl::ssl::SSL_CTX_set_mode': /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.91/src/./ssl.rs:246: undefined reference to
SSL_CTX_ctrl'collect2: error: ld returned 1 exit status
= note: some
extern
functions couldn't be found; some native libraries may need to be installed or have their path specified= note: use the
-l
flag to specify native libraries to link= note: use the
cargo:rustc-link-lib
directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)OS: ubuntu 20.04
sudo apt install pkg-config libssl-dev libclang-dev
executed
The text was updated successfully, but these errors were encountered: