Trying to configure nginx with the custom openssl in the alpine base image, but it does seem to pick the openssl which is placed under /usr/local/openssl
Step 20/22 : RUN cd nginx-${NGINX_VERSION}/ && ./configure ${NGINX_FLAGS} && make && sudo make install
---> Running in 58c8b603c0b7
checking for getaddrinfo() ... found
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for OpenSSL library ... not found
checking for OpenSSL library in /usr/local/ ... not found
checking for OpenSSL library in /usr/pkg/ ... not found
checking for OpenSSL library in /opt/local/ ... not found
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
If i end up using the --with-openssl flag i need to pass the source for the openssl, which is we do not have.
I am trying to configure nginx to be fips enabled, thus configuring nginx manually to pick the openssl library we have built, any workaround/help is highly appreciated.
Related
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /home/ec2-user/.rvm/gems/ruby-2.6.5/gems/rmagick-4.2.2/ext/RMagick
/home/ec2-user/.rvm/rubies/ruby-2.6.5/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0 -r ./siteconf20210806-10706-10mubyf.rb extconf.rb
checking for brew... no
checking for pacman... no
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.7.7)... no
checking for gcc... yes
checking for GNUC... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/ec2-user/.rvm/rubies/ruby-2.6.5/bin/$(RUBY_BASE_NAME)
/home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:585:in block in try_compile'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:534:in with_werror' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:585:in try_compile'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:852:in macro_defined?' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:994:in block in have_macro'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in open' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in open' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:357:in postpone'
from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:958:in checking_for' from /home/ec2-user/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/mkmf.rb:993:in have_macro'
from extconf.rb:99:in configure_compile_options' from extconf.rb:19:in initialize'
from extconf.rb:398:in new' from extconf.rb:398:in '
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ec2-user/.rvm/gems/ruby-2.6.5/extensions/x86_64-linux/2.6.0/rmagick-4.2.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/ec2-user/.rvm/gems/ruby-2.6.5/gems/rmagick-4.2.2 for inspection.
Results logged to /home/ec2-user/.rvm/gems/ruby-2.6.5/extensions/x86_64-linux/2.6.0/rmagick-4.2.2/gem_make.out
sudo yum -y install ImageMagick ImageMagick-devel
convert -version
Output:
Version: ImageMagick 6.9.10-68 Q16 x86_64 2021-02-03 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib fontconfig freetype gslib jng jpeg lcms ltdl lzma png ps tiff wmf x xml zlib
3. gem install rmagick
if you still get the error follow below commands
sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.spec /usr/lib64/libgomp.spec
sudo ln -s /usr/lib/gcc/x86_64-amazon-linux/4.8.5/libgomp.a /usr/lib64/libgomp.a
sudo ln -s /usr/lib64/libgomp.so.1.0.0 /usr/lib64/libgomp.so
And run again gem install rmagick and its all done.
You can find the link below
https://senrenseyo.com/20210811/rails6_rmagick/
Since I do not have a root account, I want to install the newest R (3.6.0) to my local directory. I downloaded a R-3.6.0.tar.gz file and save it to $HOME/Programs.
After
$ tar xvf R-3.6.0.tar.gz
$ cd R-3.6.0
$ ./configure --prefix=$HOME/Programs/R
I had some error like
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib library and headers are required
So I got the newest zlib library (zlib-1.2.11.tar.gz) to $HOME/Programs, and then
$ tar xvf zlib-1.2.11.tar.gz
$ cd zlib-1.2.11
$ ./configure --prefix=$HOME/Programs/zlib-1.2.11
$ make && make install
This works perfectly, but after this when I tried to configure R($ ./configure --prefix=$HOME/Programs/R) again, it still produces the same problem.
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib library and headers are required
I think this problem might be related to the PATH in my .bash_profile(currently it is set as PATH=$PATH:$HOME/bin).
I am completely new to Linux environment and bash commands, so it would be grateful if you could provide some detailed demonstration.
Trying to install R-3.3.2 but when I use $./configure, I keep getting the error:
checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required
It worked for me after:
sudo apt-get install libbz2-dev
I have successfully compiled R from source, the following steps need special attention:
install dependent libraries:
zlib-1.2.8, bzip2-1.0.6, xz-5.2.2, pcre-8.39, curl-7.52.1.
Specifically, to compile bzip2, The Makefile should be modified:
original: CC=gcc
after modification: CC=gcc -fPIC
pass the library and header file to the configure with proper variables:
export CPATH=/opt/zlib-1.2.8/include/:/opt/bzip2-1.0.6/include/:/opt/xz-5.2.2/include/:/opt/pcre-8.39/include/
export LD_LIBRARY_PATH=/opt/zlib-1.2.8/lib/:/opt/bzip2-1.0.6/lib/:/opt/xz-5.2.2/lib/:/opt/pcre-8.39/lib/
./configure --prefix=/opt/R/R_soft/ --enable-R-shlib --with-libpth-prefix=/opt/ CPPFLAGS="-I/opt/bzip2-1.0.6/include/ -I/opt/zlib-1.2.8/include/ -I/opt/xz-5.2.2/include/ -I/opt/pcre-8.39/include/ -I/opt/curl-7.52.1/include/" LDFLAGS="-L/opt/xz-5.2.2/lib/ -L/opt/zlib-1.2.8/lib/ -L/opt/bzip2-1.0.6/lib/ -L/opt/pcre-8.39/lib/ -L/opt/curl-7.52.1/lib/"
It seems CPATH and CPPFLAGS is redundant here, I found the CPPFLAGS AND LDFLAGS not worked.
First off, are you aware that you can get prebuilt binaries of current R ?
Second, your comment on the bzip2 binary has no bearing on the need for the library R needs to compile and link against.
Third, you can search: apt-cache search bzip2 | grep library would have gotten you there.
Fourth, for all existing packages you can actually install their known build dependencies. But see point one, you probably do not want to build from source.
Fifth, and closing: sudo apt-get install libbz2-dev answers your (narrow) question but you will likely have further issues. There is an entire manual devoted to installing and administering R which has all the answers for you.
To install memcached I run:
./configure
from memcached server location but I receive error:
checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/
If it's already installed, specify its path using --with-libevent=/dir/
So I installed libevent manually by downloading from http://www.monkey.org/~provos/libevent/ and running ./configure from downloaded libevent folder
But when I try command:
./configure --with-libevent=/export/home/me/libevent-2.0.21-stable/
I receive same error :
checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/
If it's already installed, specify its path using --with-libevent=/dir/
How can I check where libevent is installed? Am I specifying the path correctly?
I'm required to install libevent manually as I'm installing memcached from behind a firewall.
After downloading and extracting libevent, you have to configure, build and install it.
Only then can you go back to the memcached directory and rerun its configure, specifying where you installed libevent if it wasn't in one of the standard places (such as /lib, /usr/lib or /usr/local/lib).
When building the c extensions of readline when installing readline via pip install readline, I get an error message as follows:-
Beginning configuration for readline-6.2 for i386-apple-darwin11.3.0
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/Users/calvin/.virtualenvs/myproj/build/readline/rl/readline-lib':
configure: error: C compiler cannot create executables
See `config.log' for more details.
============ Building the readline library ============
============ Building the readline extension module ============
running install
running build
running build_ext
building 'readline' extension
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.7.sdk
Searching for the location of MacOSX10.7.sdk on my system reveals:-
calvin$ sudo find / -name "MacOSX10.7.sdk"
Password:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
Which is not where the readline compilation is expecting.
Is there a bug with how pip locates the MacOSX10.7.sdk?
How do I resolve this without resorting to copying MacOSX10.7 into the /Developer/SDKs directory?
CLARIFICATION
This is how I temporarily solve my problem.
calvin$ sudo mkdir -p /Developer/SDKs/
Password:
calvin$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk /Developer/SDKs/MacOSX10.7.sdk
calvin$ pip install readline
But I am not too sure this is the "appropriate" way to solve it as there might be some inherent problems either from how pip is supposed to locate my .sdk location or I am missing something in my system PATH. So any advice on how to resolve this the "appropriate" way would be much appreciated!
That's a good question. As a point of note, I do have a MacOSX10.7.sdk folder in /Developer/SDKs, so perhaps it's your filesystem's state that's wrong.
The safest approach is probably to install XCode, but that's horribly expensive in terms of time. I would start by creating a soft link:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk /Developer/SDKs/MacOSX10.7.sdk
and see if that does the trick.