php-mcrypt package missing in Ubuntu Server 18.04 LTS

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








up vote
4
down vote

favorite












Is the php-mcrypt package missing in Ubuntu Server 18.04 LTS?



apt install php-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-mcrypt' has no installation candidate






share|improve this question






















  • Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
    – Knud Larsen
    May 4 at 18:28














up vote
4
down vote

favorite












Is the php-mcrypt package missing in Ubuntu Server 18.04 LTS?



apt install php-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-mcrypt' has no installation candidate






share|improve this question






















  • Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
    – Knud Larsen
    May 4 at 18:28












up vote
4
down vote

favorite









up vote
4
down vote

favorite











Is the php-mcrypt package missing in Ubuntu Server 18.04 LTS?



apt install php-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-mcrypt' has no installation candidate






share|improve this question














Is the php-mcrypt package missing in Ubuntu Server 18.04 LTS?



apt install php-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php-mcrypt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-mcrypt' has no installation candidate








share|improve this question













share|improve this question




share|improve this question








edited May 16 at 6:45









Melebius

3,66841636




3,66841636










asked May 4 at 10:38









Andrea Rossetti

21112




21112











  • Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
    – Knud Larsen
    May 4 at 18:28
















  • Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
    – Knud Larsen
    May 4 at 18:28















Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
– Knud Larsen
May 4 at 18:28




Ubuntu php-mcrypt : packages.ubuntu.com/… ... No php-mcrypt for 18.04 .
– Knud Larsen
May 4 at 18:28










3 Answers
3






active

oldest

votes

















up vote
7
down vote













Mcrypt has been deprecated in PHP 7.2, so it's not available by default.



You can still install the mcrypt extension using pecl. These instructions are for the apache web server.



# Install prerequisites
sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

# Compile mcrypt extension
sudo pecl install mcrypt-1.0.1
# Just press enter when it asks about libmcrypt prefix

# Enable extension for apache
echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

# Restart apache
sudo service apache2 restart


That should get you going.



In the long term you might want to replace mcrypt, it's deprecated for a reason.






share|improve this answer





























    up vote
    2
    down vote













    php mcrypt has been removed in php 7.2 http://php.net/manual/en/migration71.deprecated.php






    share|improve this answer



























      up vote
      0
      down vote













      I did the following to get this working...



      sudo add-apt-repository ppa:ondrej/php
      sudo apt-get install php7.1-mcrypt


      If you're running php5.6 or 7.0 then you can use the following



      sudo apt-get install php5.6-mcrypt
      sudo apt-get install php7.0-mcrypt





      share|improve this answer
















      • 1




        Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
        – Andrea Rossetti
        May 5 at 21:01











      • you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
        – Alvin
        Jul 27 at 23:32











      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2faskubuntu.com%2fquestions%2f1031921%2fphp-mcrypt-package-missing-in-ubuntu-server-18-04-lts%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      7
      down vote













      Mcrypt has been deprecated in PHP 7.2, so it's not available by default.



      You can still install the mcrypt extension using pecl. These instructions are for the apache web server.



      # Install prerequisites
      sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

      # Compile mcrypt extension
      sudo pecl install mcrypt-1.0.1
      # Just press enter when it asks about libmcrypt prefix

      # Enable extension for apache
      echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

      # Restart apache
      sudo service apache2 restart


      That should get you going.



      In the long term you might want to replace mcrypt, it's deprecated for a reason.






      share|improve this answer


























        up vote
        7
        down vote













        Mcrypt has been deprecated in PHP 7.2, so it's not available by default.



        You can still install the mcrypt extension using pecl. These instructions are for the apache web server.



        # Install prerequisites
        sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

        # Compile mcrypt extension
        sudo pecl install mcrypt-1.0.1
        # Just press enter when it asks about libmcrypt prefix

        # Enable extension for apache
        echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

        # Restart apache
        sudo service apache2 restart


        That should get you going.



        In the long term you might want to replace mcrypt, it's deprecated for a reason.






        share|improve this answer
























          up vote
          7
          down vote










          up vote
          7
          down vote









          Mcrypt has been deprecated in PHP 7.2, so it's not available by default.



          You can still install the mcrypt extension using pecl. These instructions are for the apache web server.



          # Install prerequisites
          sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

          # Compile mcrypt extension
          sudo pecl install mcrypt-1.0.1
          # Just press enter when it asks about libmcrypt prefix

          # Enable extension for apache
          echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

          # Restart apache
          sudo service apache2 restart


          That should get you going.



          In the long term you might want to replace mcrypt, it's deprecated for a reason.






          share|improve this answer














          Mcrypt has been deprecated in PHP 7.2, so it's not available by default.



          You can still install the mcrypt extension using pecl. These instructions are for the apache web server.



          # Install prerequisites
          sudo apt-get install php-dev libmcrypt-dev gcc make autoconf libc-dev pkg-config

          # Compile mcrypt extension
          sudo pecl install mcrypt-1.0.1
          # Just press enter when it asks about libmcrypt prefix

          # Enable extension for apache
          echo "extension=mcrypt.so" | sudo tee -a /etc/php/7.2/apache2/conf.d/mcrypt.ini

          # Restart apache
          sudo service apache2 restart


          That should get you going.



          In the long term you might want to replace mcrypt, it's deprecated for a reason.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 8 at 7:42

























          answered May 17 at 13:45









          Epskampie

          22515




          22515






















              up vote
              2
              down vote













              php mcrypt has been removed in php 7.2 http://php.net/manual/en/migration71.deprecated.php






              share|improve this answer
























                up vote
                2
                down vote













                php mcrypt has been removed in php 7.2 http://php.net/manual/en/migration71.deprecated.php






                share|improve this answer






















                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  php mcrypt has been removed in php 7.2 http://php.net/manual/en/migration71.deprecated.php






                  share|improve this answer












                  php mcrypt has been removed in php 7.2 http://php.net/manual/en/migration71.deprecated.php







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 16 at 4:10









                  bruri wijayanto

                  211




                  211




















                      up vote
                      0
                      down vote













                      I did the following to get this working...



                      sudo add-apt-repository ppa:ondrej/php
                      sudo apt-get install php7.1-mcrypt


                      If you're running php5.6 or 7.0 then you can use the following



                      sudo apt-get install php5.6-mcrypt
                      sudo apt-get install php7.0-mcrypt





                      share|improve this answer
















                      • 1




                        Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                        – Andrea Rossetti
                        May 5 at 21:01











                      • you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                        – Alvin
                        Jul 27 at 23:32















                      up vote
                      0
                      down vote













                      I did the following to get this working...



                      sudo add-apt-repository ppa:ondrej/php
                      sudo apt-get install php7.1-mcrypt


                      If you're running php5.6 or 7.0 then you can use the following



                      sudo apt-get install php5.6-mcrypt
                      sudo apt-get install php7.0-mcrypt





                      share|improve this answer
















                      • 1




                        Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                        – Andrea Rossetti
                        May 5 at 21:01











                      • you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                        – Alvin
                        Jul 27 at 23:32













                      up vote
                      0
                      down vote










                      up vote
                      0
                      down vote









                      I did the following to get this working...



                      sudo add-apt-repository ppa:ondrej/php
                      sudo apt-get install php7.1-mcrypt


                      If you're running php5.6 or 7.0 then you can use the following



                      sudo apt-get install php5.6-mcrypt
                      sudo apt-get install php7.0-mcrypt





                      share|improve this answer












                      I did the following to get this working...



                      sudo add-apt-repository ppa:ondrej/php
                      sudo apt-get install php7.1-mcrypt


                      If you're running php5.6 or 7.0 then you can use the following



                      sudo apt-get install php5.6-mcrypt
                      sudo apt-get install php7.0-mcrypt






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 5 at 18:37









                      DanBarber

                      1




                      1







                      • 1




                        Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                        – Andrea Rossetti
                        May 5 at 21:01











                      • you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                        – Alvin
                        Jul 27 at 23:32













                      • 1




                        Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                        – Andrea Rossetti
                        May 5 at 21:01











                      • you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                        – Alvin
                        Jul 27 at 23:32








                      1




                      1




                      Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                      – Andrea Rossetti
                      May 5 at 21:01





                      Ubuntu 18.04 has php7.2 in fact after added ppa repository and installet php7.1-mcrypt, when i do a2enmod mcrypt the response is "module mcrypt is not exists" !
                      – Andrea Rossetti
                      May 5 at 21:01













                      you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                      – Alvin
                      Jul 27 at 23:32





                      you're likely using php 7.2 (/etc/php/7.2) -- this installs it to 7.1 (/etc/php/7.1/) and only works if you also install/use that version of php apt-get install php7.1
                      – Alvin
                      Jul 27 at 23:32













                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031921%2fphp-mcrypt-package-missing-in-ubuntu-server-18-04-lts%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491