title: ` error: failed to run custom build command for `openssl-sys v0.9.67`
body: <p>I am building my cargo docker file. It used to work now it doesn't.</p>
  <p>I am receiving this error:
  <code> error: failed to run custom build command for `openssl-sys v0.9.67</code></p>
  <p>I did multiple things based on my multiple digging:</p>
  <p><code>brew install openssl</code></p>
  <p><code>brew install pkg-config</code></p>
  <p><code>brew install perl</code></p>
  <p>I added the below in my dependencies in the cargo.toml as well</p>
  <pre><code>openssl-sys = &quot;0.9&quot;
  openssl = { version = &quot;0.10.33&quot;, features = [&quot;vendored&quot;] }
  </code></pre>
  <p>I even added the below on my .profile</p>
  <pre><code>export PKG_CONFIG_PATH=&quot;/usr/local/opt/openssl@3/lib/pkgconfig&quot;
  </code></pre>
  <p>Still not working.
  The error only shows during the docker build run.</p>
  <p>---here's the error---</p>
  <pre><code>#7 133.6 error: failed to run custom build command for `openssl-sys v0.9.67`
  #7 133.6 
  #7 133.6 Caused by:
  #7 133.6   process didn't exit successfully: `/build-xxx/target/release/build/openssl-sys-bb0d0329fb009fff/build-script-main` (exit status: 101)
  #7 133.6   --- stdout
  #7 133.6   cargo:rustc-cfg=const_fn
  #7 133.6   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  #7 133.6   X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  #7 133.6   cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  #7 133.6   OPENSSL_NO_VENDOR unset
  #7 133.6   CC_x86_64-unknown-linux-gnu = None
  #7 133.6   CC_x86_64_unknown_linux_gnu = None
  #7 133.6   HOST_CC = None
  #7 133.6   CC = None
  #7 133.6   CFLAGS_x86_64-unknown-linux-gnu = None
  #7 133.6   CFLAGS_x86_64_unknown_linux_gnu = None
  #7 133.6   HOST_CFLAGS = None
  #7 133.6   CFLAGS = None
  #7 133.6   CRATE_CC_NO_DEFAULTS = None
  #7 133.6   DEBUG = Some(&quot;false&quot;)
  #7 133.6   CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)
  #7 133.6   running &quot;perl&quot; &quot;./Configure&quot; &quot;--prefix=/build-xxx/target/release/build/openssl-sys-c2883a05afa95d60/out/openssl-build/install&quot; &quot;no-dso&quot; &quot;no-shared&quot; &quot;no-ssl3&quot; &quot;no-unit-test&quot; &quot;no-comp&quot; &quot;no-zlib&quot; &quot;no-zlib-dynamic&quot; &quot;no-md2&quot; &quot;no-rc5&quot; &quot;no-weak-ssl-ciphers&quot; &quot;no-camellia&quot; &quot;no-idea&quot; &quot;no-seed&quot; &quot;linux-x86_64&quot; &quot;-O2&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot;
  #7 133.6 
  #7 133.6   --- stderr
  #7 133.6   Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./Configure line 15.
  #7 133.6   BEGIN failed--compilation aborted at ./Configure line 15.
  #7 133.6   thread 'main' panicked at '
  #7 133.6 
  #7 133.6 
  #7 133.6   Error configuring OpenSSL build:
  #7 133.6       Command: &quot;perl&quot; &quot;./Configure&quot; &quot;--prefix=/build-xxx/target/release/build/openssl-sys-c2883a05afa95d60/out/openssl-build/install&quot; &quot;no-dso&quot; &quot;no-shared&quot; &quot;no-ssl3&quot; &quot;no-unit-test&quot; &quot;no-comp&quot; &quot;no-zlib&quot; &quot;no-zlib-dynamic&quot; &quot;no-md2&quot; &quot;no-rc5&quot; &quot;no-weak-ssl-ciphers&quot; &quot;no-camellia&quot; &quot;no-idea&quot; &quot;no-seed&quot; &quot;linux-x86_64&quot; &quot;-O2&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot;
  #7 133.6       Exit status: exit status: 2
  #7 133.6 
  #7 133.6 
  #7 133.6       ', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.16.0+1.1.1l/src/lib.rs:479:13
  #7 133.6   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  #7 133.6 warning: build failed, waiting for other jobs to finish...
  #7 133.7 error: build failed
  #7 ERROR: executor failed running [/bin/sh -c cd /build-xxx/ &amp;&amp; rustup default nightly &amp;&amp; rustup update &amp;&amp; cargo build --release]: exit code: 101
  
  </code></pre>
  <p>---below is the my docker file---</p>
  <pre><code>FROM rust:slim
  COPY . /build-xxx/
  RUN cd /build-xxx/ &amp;&amp; rustup default nightly &amp;&amp; rustup update &amp;&amp; cargo build --release
  LABEL Name=XXX Version=0.0.1
  EXPOSE 8000
  ENV ROCKET_ENV=stage
  </code></pre>
  <p>CMD [&quot;/build-xxx/target/release/xxx&quot;]</p>