nginx ./configure can't find openssl

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















I'm trying to install nginx and no matter what I do, nginx can't seem to find my openssl path. It looks like it's searching for files that don't exist in any of the openssl directories. Below is my make output. I've tried to specify various paths for nginx to look in for openssl.



[root@server nginx-0.8.54]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx-0.8.54'
cd /usr/local/ssl
&& make clean
&& ./config --prefix=/usr/local/ssl/.openssl no-shared no-threads
&& make
&& make install LIBDIR=lib
make[2]: Entering directory `/usr/local/ssl'
make[2]: *** No rule to make target `clean'. Stop.
make[2]: Leaving directory `/usr/local/ssl'
make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/root/nginx-0.8.54'
make: *** [build] Error 2


Anyone have any thoughts on this?










share|improve this question













migrated from stackoverflow.com Nov 2 '11 at 5:54


This question came from our site for professional and enthusiast programmers.






















    3















    I'm trying to install nginx and no matter what I do, nginx can't seem to find my openssl path. It looks like it's searching for files that don't exist in any of the openssl directories. Below is my make output. I've tried to specify various paths for nginx to look in for openssl.



    [root@server nginx-0.8.54]# make
    make -f objs/Makefile
    make[1]: Entering directory `/root/nginx-0.8.54'
    cd /usr/local/ssl
    && make clean
    && ./config --prefix=/usr/local/ssl/.openssl no-shared no-threads
    && make
    && make install LIBDIR=lib
    make[2]: Entering directory `/usr/local/ssl'
    make[2]: *** No rule to make target `clean'. Stop.
    make[2]: Leaving directory `/usr/local/ssl'
    make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 2
    make[1]: Leaving directory `/root/nginx-0.8.54'
    make: *** [build] Error 2


    Anyone have any thoughts on this?










    share|improve this question













    migrated from stackoverflow.com Nov 2 '11 at 5:54


    This question came from our site for professional and enthusiast programmers.




















      3












      3








      3








      I'm trying to install nginx and no matter what I do, nginx can't seem to find my openssl path. It looks like it's searching for files that don't exist in any of the openssl directories. Below is my make output. I've tried to specify various paths for nginx to look in for openssl.



      [root@server nginx-0.8.54]# make
      make -f objs/Makefile
      make[1]: Entering directory `/root/nginx-0.8.54'
      cd /usr/local/ssl
      && make clean
      && ./config --prefix=/usr/local/ssl/.openssl no-shared no-threads
      && make
      && make install LIBDIR=lib
      make[2]: Entering directory `/usr/local/ssl'
      make[2]: *** No rule to make target `clean'. Stop.
      make[2]: Leaving directory `/usr/local/ssl'
      make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 2
      make[1]: Leaving directory `/root/nginx-0.8.54'
      make: *** [build] Error 2


      Anyone have any thoughts on this?










      share|improve this question














      I'm trying to install nginx and no matter what I do, nginx can't seem to find my openssl path. It looks like it's searching for files that don't exist in any of the openssl directories. Below is my make output. I've tried to specify various paths for nginx to look in for openssl.



      [root@server nginx-0.8.54]# make
      make -f objs/Makefile
      make[1]: Entering directory `/root/nginx-0.8.54'
      cd /usr/local/ssl
      && make clean
      && ./config --prefix=/usr/local/ssl/.openssl no-shared no-threads
      && make
      && make install LIBDIR=lib
      make[2]: Entering directory `/usr/local/ssl'
      make[2]: *** No rule to make target `clean'. Stop.
      make[2]: Leaving directory `/usr/local/ssl'
      make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 2
      make[1]: Leaving directory `/root/nginx-0.8.54'
      make: *** [build] Error 2


      Anyone have any thoughts on this?







      nginx openssl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 11 '11 at 1:47









      ChrisChris

      126115




      126115




      migrated from stackoverflow.com Nov 2 '11 at 5:54


      This question came from our site for professional and enthusiast programmers.









      migrated from stackoverflow.com Nov 2 '11 at 5:54


      This question came from our site for professional and enthusiast programmers.






















          7 Answers
          7






          active

          oldest

          votes


















          5














          This can also occur when your nginx configure uses relative paths. It finds the libraries much more reliably if full paths from / are used instead.



          Doesn't work: ./configure --with-openssl=../openssl-source



          Works: ./configure --with-openssl=/home/build/src/openssl-source






          share|improve this answer


















          • 1





            Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

            – jaygooby
            Jun 27 '14 at 10:44


















          2














          ./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"





          share|improve this answer

























          • It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

            – peterh
            Sep 5 '17 at 3:55



















          1














          Running "yum install openssl-devel" seems lot easier than switching to ubuntu.



          Had the same issue as the OP. I had openssl installed but nginx could find it when compil but the pointer to libssl-devel helped me






          share|improve this answer






























            1














            I can't quite recall exactly what the issue was here, but I'm assuming that a symlink to /usr/local/ssl (or openssl?) to wherever openssl actually resides would solve the issue. I haven't had any problems installing nginx with SSL support in Ubuntu 10.04 with the default OpenSSL. So I would recommend anyone struggling with this to try that out.



            Also, you probably need the correct dev packages installed. Here is what I typically installing prior to install nginx..



            2 apt-get update
            3 apt-get install gcc
            4 apt-get install g++
            5 wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
            6 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
            7 wget http://zlib.net/zlib-1.2.5.tar.gz
            8 ls
            9 gzip -d pcre-8.12.tar.gz
            10 gzip -d zlib-1.2.5.tar.gz
            11 gzip -d Python-2.7.tgz
            12 tar -xvf zlib-1.2.5.tar
            13 cd zlib-1.2.5
            14 ./configure
            15 make
            16 ls
            17 Makefile
            18 ls
            19 ./configure
            20 make
            21 sudo apt-get install build-essential
            22 make
            23 make install
            24 cd ..
            25 ls
            26 tar -xvf pcre-8.12.tar
            27 cd pcre-8.12
            28 ./configure --prefix=/usr --enable-unicode-properties
            29 make
            30 make install
            31 cd ..
            32 ls
            33 tar -xvf Python-2.7.tar
            34 apt-get install openssl
            35 cd Python-2.7
            36 apt-get install libssl-dev
            37 apt-get install libperl-dev
            38 ./configure --help
            39 ./configure --enable-ipv6
            40 make
            41 make install





            share|improve this answer
































              1














              If you are trying to build nginx with macOS and openssl is installed via brew, the openssl library is installed under path like: /usr/local/opt/openssl. From brew info openssl




              This formula is keg-only, which means it was not symlinked into /usr/local,



              because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.




              In case like this, as @Bingnan said, you can let the configure script know the include and lib paths of openssl via --with-cc-opt and --with-ld-opt:



              ./configure --with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"






              share|improve this answer
































                0














                openssl headers are usually provided by libssl-dev on Ubuntu. There's also a --with-openssl=DIR ./configure option for nginx that lets you manually specify the path to openssl sources. Any reason why you're building it from source instead of using your package manager?






                share|improve this answer























                • package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                  – Chris
                  Mar 11 '11 at 2:03






                • 2





                  You'll need libssl-devel on CentOS.

                  – mech-hisui
                  Mar 11 '11 at 2:04











                • The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                  – Chris
                  Mar 13 '11 at 8:25






                • 1





                  In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                  – Nathan V
                  Sep 21 '15 at 19:48



















                0














                For Zlib



                untar the zlib tar file and then configure it



                Path - /opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8



                ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8
                make
                make install



                For PCRE



                Untar PCRE file then configure it



                Path - /opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36



                ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36

                make
                make install



                Just untar the file no need to configure it, Nginx will use it by it self



                for openssl



                Path - /opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l




                For Nginx



                ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/nginx --with-pcre=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36 --with-zlib=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8 --with-http_ssl_module --with-openssl=/opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l





                share|improve this answer
























                  Your Answer








                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "106"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader:
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  ,
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f23799%2fnginx-configure-cant-find-openssl%23new-answer', 'question_page');

                  );

                  Post as a guest















                  Required, but never shown

























                  7 Answers
                  7






                  active

                  oldest

                  votes








                  7 Answers
                  7






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  5














                  This can also occur when your nginx configure uses relative paths. It finds the libraries much more reliably if full paths from / are used instead.



                  Doesn't work: ./configure --with-openssl=../openssl-source



                  Works: ./configure --with-openssl=/home/build/src/openssl-source






                  share|improve this answer


















                  • 1





                    Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                    – jaygooby
                    Jun 27 '14 at 10:44















                  5














                  This can also occur when your nginx configure uses relative paths. It finds the libraries much more reliably if full paths from / are used instead.



                  Doesn't work: ./configure --with-openssl=../openssl-source



                  Works: ./configure --with-openssl=/home/build/src/openssl-source






                  share|improve this answer


















                  • 1





                    Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                    – jaygooby
                    Jun 27 '14 at 10:44













                  5












                  5








                  5







                  This can also occur when your nginx configure uses relative paths. It finds the libraries much more reliably if full paths from / are used instead.



                  Doesn't work: ./configure --with-openssl=../openssl-source



                  Works: ./configure --with-openssl=/home/build/src/openssl-source






                  share|improve this answer













                  This can also occur when your nginx configure uses relative paths. It finds the libraries much more reliably if full paths from / are used instead.



                  Doesn't work: ./configure --with-openssl=../openssl-source



                  Works: ./configure --with-openssl=/home/build/src/openssl-source







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 16 '13 at 5:18









                  IanIan

                  15113




                  15113







                  • 1





                    Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                    – jaygooby
                    Jun 27 '14 at 10:44












                  • 1





                    Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                    – jaygooby
                    Jun 27 '14 at 10:44







                  1




                  1





                  Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                  – jaygooby
                  Jun 27 '14 at 10:44





                  Great, worked for me. I was using ~/src/openssl-1.0.1 and it was failing. Using /home/me/src/openssl-1.0.1 fixed it.

                  – jaygooby
                  Jun 27 '14 at 10:44













                  2














                  ./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"





                  share|improve this answer

























                  • It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                    – peterh
                    Sep 5 '17 at 3:55
















                  2














                  ./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"





                  share|improve this answer

























                  • It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                    – peterh
                    Sep 5 '17 at 3:55














                  2












                  2








                  2







                  ./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"





                  share|improve this answer















                  ./configure —with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 5 '17 at 3:54









                  peterh

                  4,441113157




                  4,441113157










                  answered Sep 5 '17 at 3:23









                  BingnanBingnan

                  212




                  212












                  • It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                    – peterh
                    Sep 5 '17 at 3:55


















                  • It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                    – peterh
                    Sep 5 '17 at 3:55

















                  It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                  – peterh
                  Sep 5 '17 at 3:55






                  It is better, if you also explain, what does this command actually do. Single commands can really understable only by the people knowing them anyways. Bruce Lee.

                  – peterh
                  Sep 5 '17 at 3:55












                  1














                  Running "yum install openssl-devel" seems lot easier than switching to ubuntu.



                  Had the same issue as the OP. I had openssl installed but nginx could find it when compil but the pointer to libssl-devel helped me






                  share|improve this answer



























                    1














                    Running "yum install openssl-devel" seems lot easier than switching to ubuntu.



                    Had the same issue as the OP. I had openssl installed but nginx could find it when compil but the pointer to libssl-devel helped me






                    share|improve this answer

























                      1












                      1








                      1







                      Running "yum install openssl-devel" seems lot easier than switching to ubuntu.



                      Had the same issue as the OP. I had openssl installed but nginx could find it when compil but the pointer to libssl-devel helped me






                      share|improve this answer













                      Running "yum install openssl-devel" seems lot easier than switching to ubuntu.



                      Had the same issue as the OP. I had openssl installed but nginx could find it when compil but the pointer to libssl-devel helped me







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 16 '11 at 21:49







                      Dayo




























                          1














                          I can't quite recall exactly what the issue was here, but I'm assuming that a symlink to /usr/local/ssl (or openssl?) to wherever openssl actually resides would solve the issue. I haven't had any problems installing nginx with SSL support in Ubuntu 10.04 with the default OpenSSL. So I would recommend anyone struggling with this to try that out.



                          Also, you probably need the correct dev packages installed. Here is what I typically installing prior to install nginx..



                          2 apt-get update
                          3 apt-get install gcc
                          4 apt-get install g++
                          5 wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
                          6 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
                          7 wget http://zlib.net/zlib-1.2.5.tar.gz
                          8 ls
                          9 gzip -d pcre-8.12.tar.gz
                          10 gzip -d zlib-1.2.5.tar.gz
                          11 gzip -d Python-2.7.tgz
                          12 tar -xvf zlib-1.2.5.tar
                          13 cd zlib-1.2.5
                          14 ./configure
                          15 make
                          16 ls
                          17 Makefile
                          18 ls
                          19 ./configure
                          20 make
                          21 sudo apt-get install build-essential
                          22 make
                          23 make install
                          24 cd ..
                          25 ls
                          26 tar -xvf pcre-8.12.tar
                          27 cd pcre-8.12
                          28 ./configure --prefix=/usr --enable-unicode-properties
                          29 make
                          30 make install
                          31 cd ..
                          32 ls
                          33 tar -xvf Python-2.7.tar
                          34 apt-get install openssl
                          35 cd Python-2.7
                          36 apt-get install libssl-dev
                          37 apt-get install libperl-dev
                          38 ./configure --help
                          39 ./configure --enable-ipv6
                          40 make
                          41 make install





                          share|improve this answer





























                            1














                            I can't quite recall exactly what the issue was here, but I'm assuming that a symlink to /usr/local/ssl (or openssl?) to wherever openssl actually resides would solve the issue. I haven't had any problems installing nginx with SSL support in Ubuntu 10.04 with the default OpenSSL. So I would recommend anyone struggling with this to try that out.



                            Also, you probably need the correct dev packages installed. Here is what I typically installing prior to install nginx..



                            2 apt-get update
                            3 apt-get install gcc
                            4 apt-get install g++
                            5 wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
                            6 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
                            7 wget http://zlib.net/zlib-1.2.5.tar.gz
                            8 ls
                            9 gzip -d pcre-8.12.tar.gz
                            10 gzip -d zlib-1.2.5.tar.gz
                            11 gzip -d Python-2.7.tgz
                            12 tar -xvf zlib-1.2.5.tar
                            13 cd zlib-1.2.5
                            14 ./configure
                            15 make
                            16 ls
                            17 Makefile
                            18 ls
                            19 ./configure
                            20 make
                            21 sudo apt-get install build-essential
                            22 make
                            23 make install
                            24 cd ..
                            25 ls
                            26 tar -xvf pcre-8.12.tar
                            27 cd pcre-8.12
                            28 ./configure --prefix=/usr --enable-unicode-properties
                            29 make
                            30 make install
                            31 cd ..
                            32 ls
                            33 tar -xvf Python-2.7.tar
                            34 apt-get install openssl
                            35 cd Python-2.7
                            36 apt-get install libssl-dev
                            37 apt-get install libperl-dev
                            38 ./configure --help
                            39 ./configure --enable-ipv6
                            40 make
                            41 make install





                            share|improve this answer



























                              1












                              1








                              1







                              I can't quite recall exactly what the issue was here, but I'm assuming that a symlink to /usr/local/ssl (or openssl?) to wherever openssl actually resides would solve the issue. I haven't had any problems installing nginx with SSL support in Ubuntu 10.04 with the default OpenSSL. So I would recommend anyone struggling with this to try that out.



                              Also, you probably need the correct dev packages installed. Here is what I typically installing prior to install nginx..



                              2 apt-get update
                              3 apt-get install gcc
                              4 apt-get install g++
                              5 wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
                              6 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
                              7 wget http://zlib.net/zlib-1.2.5.tar.gz
                              8 ls
                              9 gzip -d pcre-8.12.tar.gz
                              10 gzip -d zlib-1.2.5.tar.gz
                              11 gzip -d Python-2.7.tgz
                              12 tar -xvf zlib-1.2.5.tar
                              13 cd zlib-1.2.5
                              14 ./configure
                              15 make
                              16 ls
                              17 Makefile
                              18 ls
                              19 ./configure
                              20 make
                              21 sudo apt-get install build-essential
                              22 make
                              23 make install
                              24 cd ..
                              25 ls
                              26 tar -xvf pcre-8.12.tar
                              27 cd pcre-8.12
                              28 ./configure --prefix=/usr --enable-unicode-properties
                              29 make
                              30 make install
                              31 cd ..
                              32 ls
                              33 tar -xvf Python-2.7.tar
                              34 apt-get install openssl
                              35 cd Python-2.7
                              36 apt-get install libssl-dev
                              37 apt-get install libperl-dev
                              38 ./configure --help
                              39 ./configure --enable-ipv6
                              40 make
                              41 make install





                              share|improve this answer















                              I can't quite recall exactly what the issue was here, but I'm assuming that a symlink to /usr/local/ssl (or openssl?) to wherever openssl actually resides would solve the issue. I haven't had any problems installing nginx with SSL support in Ubuntu 10.04 with the default OpenSSL. So I would recommend anyone struggling with this to try that out.



                              Also, you probably need the correct dev packages installed. Here is what I typically installing prior to install nginx..



                              2 apt-get update
                              3 apt-get install gcc
                              4 apt-get install g++
                              5 wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz
                              6 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
                              7 wget http://zlib.net/zlib-1.2.5.tar.gz
                              8 ls
                              9 gzip -d pcre-8.12.tar.gz
                              10 gzip -d zlib-1.2.5.tar.gz
                              11 gzip -d Python-2.7.tgz
                              12 tar -xvf zlib-1.2.5.tar
                              13 cd zlib-1.2.5
                              14 ./configure
                              15 make
                              16 ls
                              17 Makefile
                              18 ls
                              19 ./configure
                              20 make
                              21 sudo apt-get install build-essential
                              22 make
                              23 make install
                              24 cd ..
                              25 ls
                              26 tar -xvf pcre-8.12.tar
                              27 cd pcre-8.12
                              28 ./configure --prefix=/usr --enable-unicode-properties
                              29 make
                              30 make install
                              31 cd ..
                              32 ls
                              33 tar -xvf Python-2.7.tar
                              34 apt-get install openssl
                              35 cd Python-2.7
                              36 apt-get install libssl-dev
                              37 apt-get install libperl-dev
                              38 ./configure --help
                              39 ./configure --enable-ipv6
                              40 make
                              41 make install






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Nov 4 '11 at 5:48









                              Michael Mrozek

                              61.5k29191211




                              61.5k29191211










                              answered Mar 13 '11 at 8:27









                              ChrisChris

                              126115




                              126115





















                                  1














                                  If you are trying to build nginx with macOS and openssl is installed via brew, the openssl library is installed under path like: /usr/local/opt/openssl. From brew info openssl




                                  This formula is keg-only, which means it was not symlinked into /usr/local,



                                  because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.




                                  In case like this, as @Bingnan said, you can let the configure script know the include and lib paths of openssl via --with-cc-opt and --with-ld-opt:



                                  ./configure --with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"






                                  share|improve this answer





























                                    1














                                    If you are trying to build nginx with macOS and openssl is installed via brew, the openssl library is installed under path like: /usr/local/opt/openssl. From brew info openssl




                                    This formula is keg-only, which means it was not symlinked into /usr/local,



                                    because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.




                                    In case like this, as @Bingnan said, you can let the configure script know the include and lib paths of openssl via --with-cc-opt and --with-ld-opt:



                                    ./configure --with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"






                                    share|improve this answer



























                                      1












                                      1








                                      1







                                      If you are trying to build nginx with macOS and openssl is installed via brew, the openssl library is installed under path like: /usr/local/opt/openssl. From brew info openssl




                                      This formula is keg-only, which means it was not symlinked into /usr/local,



                                      because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.




                                      In case like this, as @Bingnan said, you can let the configure script know the include and lib paths of openssl via --with-cc-opt and --with-ld-opt:



                                      ./configure --with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"






                                      share|improve this answer















                                      If you are trying to build nginx with macOS and openssl is installed via brew, the openssl library is installed under path like: /usr/local/opt/openssl. From brew info openssl




                                      This formula is keg-only, which means it was not symlinked into /usr/local,



                                      because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.




                                      In case like this, as @Bingnan said, you can let the configure script know the include and lib paths of openssl via --with-cc-opt and --with-ld-opt:



                                      ./configure --with-cc-opt="-I/usr/local/opt/openssl/include" --with-ld-opt="-L/usr/local/opt/openssl/lib"







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Jan 29 at 19:49









                                      Daniel V.

                                      1235




                                      1235










                                      answered Oct 23 '17 at 13:29









                                      9re9re

                                      1114




                                      1114





















                                          0














                                          openssl headers are usually provided by libssl-dev on Ubuntu. There's also a --with-openssl=DIR ./configure option for nginx that lets you manually specify the path to openssl sources. Any reason why you're building it from source instead of using your package manager?






                                          share|improve this answer























                                          • package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                            – Chris
                                            Mar 11 '11 at 2:03






                                          • 2





                                            You'll need libssl-devel on CentOS.

                                            – mech-hisui
                                            Mar 11 '11 at 2:04











                                          • The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                            – Chris
                                            Mar 13 '11 at 8:25






                                          • 1





                                            In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                            – Nathan V
                                            Sep 21 '15 at 19:48
















                                          0














                                          openssl headers are usually provided by libssl-dev on Ubuntu. There's also a --with-openssl=DIR ./configure option for nginx that lets you manually specify the path to openssl sources. Any reason why you're building it from source instead of using your package manager?






                                          share|improve this answer























                                          • package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                            – Chris
                                            Mar 11 '11 at 2:03






                                          • 2





                                            You'll need libssl-devel on CentOS.

                                            – mech-hisui
                                            Mar 11 '11 at 2:04











                                          • The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                            – Chris
                                            Mar 13 '11 at 8:25






                                          • 1





                                            In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                            – Nathan V
                                            Sep 21 '15 at 19:48














                                          0












                                          0








                                          0







                                          openssl headers are usually provided by libssl-dev on Ubuntu. There's also a --with-openssl=DIR ./configure option for nginx that lets you manually specify the path to openssl sources. Any reason why you're building it from source instead of using your package manager?






                                          share|improve this answer













                                          openssl headers are usually provided by libssl-dev on Ubuntu. There's also a --with-openssl=DIR ./configure option for nginx that lets you manually specify the path to openssl sources. Any reason why you're building it from source instead of using your package manager?







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Mar 11 '11 at 2:01







                                          mech-hisui



















                                          • package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                            – Chris
                                            Mar 11 '11 at 2:03






                                          • 2





                                            You'll need libssl-devel on CentOS.

                                            – mech-hisui
                                            Mar 11 '11 at 2:04











                                          • The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                            – Chris
                                            Mar 13 '11 at 8:25






                                          • 1





                                            In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                            – Nathan V
                                            Sep 21 '15 at 19:48


















                                          • package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                            – Chris
                                            Mar 11 '11 at 2:03






                                          • 2





                                            You'll need libssl-devel on CentOS.

                                            – mech-hisui
                                            Mar 11 '11 at 2:04











                                          • The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                            – Chris
                                            Mar 13 '11 at 8:25






                                          • 1





                                            In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                            – Nathan V
                                            Sep 21 '15 at 19:48

















                                          package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                          – Chris
                                          Mar 11 '11 at 2:03





                                          package managers aren't the latest versions. I'd rather upgrade everything myself. I'm running on CentOS 5.5 though. I'm using the --with-openssl=DIR option, but it's looking for files in my openssl path that don't exist.

                                          – Chris
                                          Mar 11 '11 at 2:03




                                          2




                                          2





                                          You'll need libssl-devel on CentOS.

                                          – mech-hisui
                                          Mar 11 '11 at 2:04





                                          You'll need libssl-devel on CentOS.

                                          – mech-hisui
                                          Mar 11 '11 at 2:04













                                          The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                          – Chris
                                          Mar 13 '11 at 8:25





                                          The package is named differently than that on CentOS.. I ended up switching to Ubuntu and got everything working. Thanks for the help though.

                                          – Chris
                                          Mar 13 '11 at 8:25




                                          1




                                          1





                                          In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                          – Nathan V
                                          Sep 21 '15 at 19:48






                                          In current Ubuntu the command is ./configure --with-openssl=/usr/include/openssl/

                                          – Nathan V
                                          Sep 21 '15 at 19:48












                                          0














                                          For Zlib



                                          untar the zlib tar file and then configure it



                                          Path - /opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8



                                          ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8
                                          make
                                          make install



                                          For PCRE



                                          Untar PCRE file then configure it



                                          Path - /opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36



                                          ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36

                                          make
                                          make install



                                          Just untar the file no need to configure it, Nginx will use it by it self



                                          for openssl



                                          Path - /opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l




                                          For Nginx



                                          ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/nginx --with-pcre=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36 --with-zlib=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8 --with-http_ssl_module --with-openssl=/opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l





                                          share|improve this answer





























                                            0














                                            For Zlib



                                            untar the zlib tar file and then configure it



                                            Path - /opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8



                                            ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8
                                            make
                                            make install



                                            For PCRE



                                            Untar PCRE file then configure it



                                            Path - /opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36



                                            ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36

                                            make
                                            make install



                                            Just untar the file no need to configure it, Nginx will use it by it self



                                            for openssl



                                            Path - /opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l




                                            For Nginx



                                            ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/nginx --with-pcre=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36 --with-zlib=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8 --with-http_ssl_module --with-openssl=/opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l





                                            share|improve this answer



























                                              0












                                              0








                                              0







                                              For Zlib



                                              untar the zlib tar file and then configure it



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8
                                              make
                                              make install



                                              For PCRE



                                              Untar PCRE file then configure it



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36

                                              make
                                              make install



                                              Just untar the file no need to configure it, Nginx will use it by it self



                                              for openssl



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l




                                              For Nginx



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/nginx --with-pcre=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36 --with-zlib=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8 --with-http_ssl_module --with-openssl=/opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l





                                              share|improve this answer















                                              For Zlib



                                              untar the zlib tar file and then configure it



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8
                                              make
                                              make install



                                              For PCRE



                                              Untar PCRE file then configure it



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36

                                              make
                                              make install



                                              Just untar the file no need to configure it, Nginx will use it by it self



                                              for openssl



                                              Path - /opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l




                                              For Nginx



                                              ./configure --prefix=/opt/app/workload/nginx-test/nginx-1.8.0/nginx --with-pcre=/opt/app/workload/nginx-test/nginx-1.8.0/pcre/pcre-8.36 --with-zlib=/opt/app/workload/nginx-test/nginx-1.8.0/zlib/zlib-1.2.8 --with-http_ssl_module --with-openssl=/opt/app/workload/nginx-test/nginx-1.8.0/openssl-1.0.1l






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Dec 11 '15 at 11:51









                                              Mathieu

                                              1,93311418




                                              1,93311418










                                              answered Dec 11 '15 at 11:29









                                              Mohammad AsifMohammad Asif

                                              1




                                              1



























                                                  draft saved

                                                  draft discarded
















































                                                  Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f23799%2fnginx-configure-cant-find-openssl%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown






                                                  Popular posts from this blog

                                                  How to check contact read email or not when send email to Individual?

                                                  Bahrain

                                                  Postfix configuration issue with fips on centos 7; mailgun relay