Error installing PHP7.1 with apache2 on debian 9

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











up vote
2
down vote

favorite
1












Hello I installed the apache with debian's 9 installation. Then installed php7.0 with apt-get but I need to install php7.1, at first I do



# su
# apt-get purge php7.0


so I downloaded from http://php.net/downloads.php php 7.1.10 and make this



# ./configure --with-mcrypt
# make
# make install


but phpinfo() get the php7.0, so I make



# su
# apt-get purge php7.0
# apt-get autoremove php7.0


and know phpinfo() is not working. I sumed that now php is not installed.



Then downloaded from http://php.net/downloads.php php 7.1.11 (new today) and inside



# tar jxvf php-7.1.11.tar.bz2
# apt-get install build-essential
# apt-get install libxml2-dev libmcrypt-dev libjpeg-dev
# cd php-7.1.11
# ./configure --with-mcrypt --with-pdo-pgsql=/etc/postgresql/9.6/main --with-openssl=/usr/bin/openssl --with-zlib --with-apxs2=/usr/bin/apxs2


And between all the checks I get the next errors



Configuring SAPI modules
checking for Apache 2.0 handler-module support via DSO through APXS... [Fri Oct 27 12:30:45.328686 2017] [core:warn] [pid 12056] AH00111: Config variable $APACHE_RUN_DIR is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
yes

configure: error: Cannot find OpenSSL's <evp.h>


What's wrong with this?







share|improve this question


























    up vote
    2
    down vote

    favorite
    1












    Hello I installed the apache with debian's 9 installation. Then installed php7.0 with apt-get but I need to install php7.1, at first I do



    # su
    # apt-get purge php7.0


    so I downloaded from http://php.net/downloads.php php 7.1.10 and make this



    # ./configure --with-mcrypt
    # make
    # make install


    but phpinfo() get the php7.0, so I make



    # su
    # apt-get purge php7.0
    # apt-get autoremove php7.0


    and know phpinfo() is not working. I sumed that now php is not installed.



    Then downloaded from http://php.net/downloads.php php 7.1.11 (new today) and inside



    # tar jxvf php-7.1.11.tar.bz2
    # apt-get install build-essential
    # apt-get install libxml2-dev libmcrypt-dev libjpeg-dev
    # cd php-7.1.11
    # ./configure --with-mcrypt --with-pdo-pgsql=/etc/postgresql/9.6/main --with-openssl=/usr/bin/openssl --with-zlib --with-apxs2=/usr/bin/apxs2


    And between all the checks I get the next errors



    Configuring SAPI modules
    checking for Apache 2.0 handler-module support via DSO through APXS... [Fri Oct 27 12:30:45.328686 2017] [core:warn] [pid 12056] AH00111: Config variable $APACHE_RUN_DIR is not defined
    apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
    yes

    configure: error: Cannot find OpenSSL's <evp.h>


    What's wrong with this?







    share|improve this question
























      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      Hello I installed the apache with debian's 9 installation. Then installed php7.0 with apt-get but I need to install php7.1, at first I do



      # su
      # apt-get purge php7.0


      so I downloaded from http://php.net/downloads.php php 7.1.10 and make this



      # ./configure --with-mcrypt
      # make
      # make install


      but phpinfo() get the php7.0, so I make



      # su
      # apt-get purge php7.0
      # apt-get autoremove php7.0


      and know phpinfo() is not working. I sumed that now php is not installed.



      Then downloaded from http://php.net/downloads.php php 7.1.11 (new today) and inside



      # tar jxvf php-7.1.11.tar.bz2
      # apt-get install build-essential
      # apt-get install libxml2-dev libmcrypt-dev libjpeg-dev
      # cd php-7.1.11
      # ./configure --with-mcrypt --with-pdo-pgsql=/etc/postgresql/9.6/main --with-openssl=/usr/bin/openssl --with-zlib --with-apxs2=/usr/bin/apxs2


      And between all the checks I get the next errors



      Configuring SAPI modules
      checking for Apache 2.0 handler-module support via DSO through APXS... [Fri Oct 27 12:30:45.328686 2017] [core:warn] [pid 12056] AH00111: Config variable $APACHE_RUN_DIR is not defined
      apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
      yes

      configure: error: Cannot find OpenSSL's <evp.h>


      What's wrong with this?







      share|improve this question














      Hello I installed the apache with debian's 9 installation. Then installed php7.0 with apt-get but I need to install php7.1, at first I do



      # su
      # apt-get purge php7.0


      so I downloaded from http://php.net/downloads.php php 7.1.10 and make this



      # ./configure --with-mcrypt
      # make
      # make install


      but phpinfo() get the php7.0, so I make



      # su
      # apt-get purge php7.0
      # apt-get autoremove php7.0


      and know phpinfo() is not working. I sumed that now php is not installed.



      Then downloaded from http://php.net/downloads.php php 7.1.11 (new today) and inside



      # tar jxvf php-7.1.11.tar.bz2
      # apt-get install build-essential
      # apt-get install libxml2-dev libmcrypt-dev libjpeg-dev
      # cd php-7.1.11
      # ./configure --with-mcrypt --with-pdo-pgsql=/etc/postgresql/9.6/main --with-openssl=/usr/bin/openssl --with-zlib --with-apxs2=/usr/bin/apxs2


      And between all the checks I get the next errors



      Configuring SAPI modules
      checking for Apache 2.0 handler-module support via DSO through APXS... [Fri Oct 27 12:30:45.328686 2017] [core:warn] [pid 12056] AH00111: Config variable $APACHE_RUN_DIR is not defined
      apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
      yes

      configure: error: Cannot find OpenSSL's <evp.h>


      What's wrong with this?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 30 '17 at 14:33

























      asked Oct 30 '17 at 12:26









      Braian Mellor

      1184




      1184




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          use Sury repo for this (https://deb.sury.org/), this is a small script to add it to your repo list.



          #!/bin/bash
          # To add this repository please do:

          if [ "$(whoami)" != "root" ]; then
          SUDO=sudo
          fi

          $SUDO apt-get install apt-transport-https lsb-release ca-certificates
          $SUDO wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
          $SUDO sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
          $SUDO apt-get update


          • Source: https://packages.sury.org/php/README.txt

          It is far a better option to use Debian repo to install SW rather than to go manual, it will avoid you a lot of headaches :)






          share|improve this answer




















          • I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
            – Braian Mellor
            Oct 30 '17 at 14:35










          • I created a new question for this here: unix.stackexchange.com/questions/401421/…
            – Braian Mellor
            Oct 30 '17 at 15:15

















          up vote
          0
          down vote













          You may be missing SSL dev. Try this...



          apt-get install libssl-dev


          Likely this will solve your problem.



          Tip: Anytime you're missing a file, use apt-get to find it's package...



          apt-file search /evp.h | egrep '/evp.h$'





          share|improve this answer




















          • I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
            – Braian Mellor
            Oct 30 '17 at 13:16











          • Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
            – David Favor
            Nov 1 '17 at 13:03










          • I marked this unix.stackexchange.com/a/401405/245622 as the answer
            – Braian Mellor
            Nov 1 '17 at 13:16










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f401397%2ferror-installing-php7-1-with-apache2-on-debian-9%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          use Sury repo for this (https://deb.sury.org/), this is a small script to add it to your repo list.



          #!/bin/bash
          # To add this repository please do:

          if [ "$(whoami)" != "root" ]; then
          SUDO=sudo
          fi

          $SUDO apt-get install apt-transport-https lsb-release ca-certificates
          $SUDO wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
          $SUDO sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
          $SUDO apt-get update


          • Source: https://packages.sury.org/php/README.txt

          It is far a better option to use Debian repo to install SW rather than to go manual, it will avoid you a lot of headaches :)






          share|improve this answer




















          • I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
            – Braian Mellor
            Oct 30 '17 at 14:35










          • I created a new question for this here: unix.stackexchange.com/questions/401421/…
            – Braian Mellor
            Oct 30 '17 at 15:15














          up vote
          3
          down vote



          accepted










          use Sury repo for this (https://deb.sury.org/), this is a small script to add it to your repo list.



          #!/bin/bash
          # To add this repository please do:

          if [ "$(whoami)" != "root" ]; then
          SUDO=sudo
          fi

          $SUDO apt-get install apt-transport-https lsb-release ca-certificates
          $SUDO wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
          $SUDO sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
          $SUDO apt-get update


          • Source: https://packages.sury.org/php/README.txt

          It is far a better option to use Debian repo to install SW rather than to go manual, it will avoid you a lot of headaches :)






          share|improve this answer




















          • I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
            – Braian Mellor
            Oct 30 '17 at 14:35










          • I created a new question for this here: unix.stackexchange.com/questions/401421/…
            – Braian Mellor
            Oct 30 '17 at 15:15












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          use Sury repo for this (https://deb.sury.org/), this is a small script to add it to your repo list.



          #!/bin/bash
          # To add this repository please do:

          if [ "$(whoami)" != "root" ]; then
          SUDO=sudo
          fi

          $SUDO apt-get install apt-transport-https lsb-release ca-certificates
          $SUDO wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
          $SUDO sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
          $SUDO apt-get update


          • Source: https://packages.sury.org/php/README.txt

          It is far a better option to use Debian repo to install SW rather than to go manual, it will avoid you a lot of headaches :)






          share|improve this answer












          use Sury repo for this (https://deb.sury.org/), this is a small script to add it to your repo list.



          #!/bin/bash
          # To add this repository please do:

          if [ "$(whoami)" != "root" ]; then
          SUDO=sudo
          fi

          $SUDO apt-get install apt-transport-https lsb-release ca-certificates
          $SUDO wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
          $SUDO sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
          $SUDO apt-get update


          • Source: https://packages.sury.org/php/README.txt

          It is far a better option to use Debian repo to install SW rather than to go manual, it will avoid you a lot of headaches :)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 30 '17 at 13:13









          Kramer

          1376




          1376











          • I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
            – Braian Mellor
            Oct 30 '17 at 14:35










          • I created a new question for this here: unix.stackexchange.com/questions/401421/…
            – Braian Mellor
            Oct 30 '17 at 15:15
















          • I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
            – Braian Mellor
            Oct 30 '17 at 14:35










          • I created a new question for this here: unix.stackexchange.com/questions/401421/…
            – Braian Mellor
            Oct 30 '17 at 15:15















          I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
          – Braian Mellor
          Oct 30 '17 at 14:35




          I got one more question, with phpinfo() I get PHP Version 7.1.11-1 and inside terminal I get 7.1.10. How can I change that? and I get this error in terminal The openssl extension is required for SSL/TLS protection but is not available
          – Braian Mellor
          Oct 30 '17 at 14:35












          I created a new question for this here: unix.stackexchange.com/questions/401421/…
          – Braian Mellor
          Oct 30 '17 at 15:15




          I created a new question for this here: unix.stackexchange.com/questions/401421/…
          – Braian Mellor
          Oct 30 '17 at 15:15












          up vote
          0
          down vote













          You may be missing SSL dev. Try this...



          apt-get install libssl-dev


          Likely this will solve your problem.



          Tip: Anytime you're missing a file, use apt-get to find it's package...



          apt-file search /evp.h | egrep '/evp.h$'





          share|improve this answer




















          • I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
            – Braian Mellor
            Oct 30 '17 at 13:16











          • Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
            – David Favor
            Nov 1 '17 at 13:03










          • I marked this unix.stackexchange.com/a/401405/245622 as the answer
            – Braian Mellor
            Nov 1 '17 at 13:16














          up vote
          0
          down vote













          You may be missing SSL dev. Try this...



          apt-get install libssl-dev


          Likely this will solve your problem.



          Tip: Anytime you're missing a file, use apt-get to find it's package...



          apt-file search /evp.h | egrep '/evp.h$'





          share|improve this answer




















          • I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
            – Braian Mellor
            Oct 30 '17 at 13:16











          • Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
            – David Favor
            Nov 1 '17 at 13:03










          • I marked this unix.stackexchange.com/a/401405/245622 as the answer
            – Braian Mellor
            Nov 1 '17 at 13:16












          up vote
          0
          down vote










          up vote
          0
          down vote









          You may be missing SSL dev. Try this...



          apt-get install libssl-dev


          Likely this will solve your problem.



          Tip: Anytime you're missing a file, use apt-get to find it's package...



          apt-file search /evp.h | egrep '/evp.h$'





          share|improve this answer












          You may be missing SSL dev. Try this...



          apt-get install libssl-dev


          Likely this will solve your problem.



          Tip: Anytime you're missing a file, use apt-get to find it's package...



          apt-file search /evp.h | egrep '/evp.h$'






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 30 '17 at 13:15









          David Favor

          33014




          33014











          • I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
            – Braian Mellor
            Oct 30 '17 at 13:16











          • Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
            – David Favor
            Nov 1 '17 at 13:03










          • I marked this unix.stackexchange.com/a/401405/245622 as the answer
            – Braian Mellor
            Nov 1 '17 at 13:16
















          • I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
            – Braian Mellor
            Oct 30 '17 at 13:16











          • Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
            – David Favor
            Nov 1 '17 at 13:03










          • I marked this unix.stackexchange.com/a/401405/245622 as the answer
            – Braian Mellor
            Nov 1 '17 at 13:16















          I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
          – Braian Mellor
          Oct 30 '17 at 13:16





          I've installed libssl-dev: $ openssl version OpenSSL 1.1.0f 25 May 2017
          – Braian Mellor
          Oct 30 '17 at 13:16













          Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
          – David Favor
          Nov 1 '17 at 13:03




          Post an update as to whether this fixed your problem or your problem persists or if you have a new problem.
          – David Favor
          Nov 1 '17 at 13:03












          I marked this unix.stackexchange.com/a/401405/245622 as the answer
          – Braian Mellor
          Nov 1 '17 at 13:16




          I marked this unix.stackexchange.com/a/401405/245622 as the answer
          – Braian Mellor
          Nov 1 '17 at 13:16

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401397%2ferror-installing-php7-1-with-apache2-on-debian-9%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          The Forum (Inglewood, California)

          Palaiologos