apt: Install all php packages whatsoever












1















I'm quite fed up with tracking packages of PHP extensions that are needed for some GUIs like PHPMyAdmin or some CMSs like Drupal.



For example, I once did:



apt upgrade php-{cli,curl,mbstring,mcrypt,gd}


but now mcrypt is deprecated.



Also, in Arch Linux, some php-extension packages are included OOB in the php package.



Is there an apt command to install all PHP packages whatsoever that I could run after apt install lamp-server^ to save all this tracking?



Maybe apt install php is exactly what I need? Pilot6 thank you !










share|improve this question





























    1















    I'm quite fed up with tracking packages of PHP extensions that are needed for some GUIs like PHPMyAdmin or some CMSs like Drupal.



    For example, I once did:



    apt upgrade php-{cli,curl,mbstring,mcrypt,gd}


    but now mcrypt is deprecated.



    Also, in Arch Linux, some php-extension packages are included OOB in the php package.



    Is there an apt command to install all PHP packages whatsoever that I could run after apt install lamp-server^ to save all this tracking?



    Maybe apt install php is exactly what I need? Pilot6 thank you !










    share|improve this question



























      1












      1








      1








      I'm quite fed up with tracking packages of PHP extensions that are needed for some GUIs like PHPMyAdmin or some CMSs like Drupal.



      For example, I once did:



      apt upgrade php-{cli,curl,mbstring,mcrypt,gd}


      but now mcrypt is deprecated.



      Also, in Arch Linux, some php-extension packages are included OOB in the php package.



      Is there an apt command to install all PHP packages whatsoever that I could run after apt install lamp-server^ to save all this tracking?



      Maybe apt install php is exactly what I need? Pilot6 thank you !










      share|improve this question
















      I'm quite fed up with tracking packages of PHP extensions that are needed for some GUIs like PHPMyAdmin or some CMSs like Drupal.



      For example, I once did:



      apt upgrade php-{cli,curl,mbstring,mcrypt,gd}


      but now mcrypt is deprecated.



      Also, in Arch Linux, some php-extension packages are included OOB in the php package.



      Is there an apt command to install all PHP packages whatsoever that I could run after apt install lamp-server^ to save all this tracking?



      Maybe apt install php is exactly what I need? Pilot6 thank you !







      shell-script debian apt apache-httpd php






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 2 at 9:40







      JohnDoea

















      asked Mar 2 at 6:08









      JohnDoeaJohnDoea

      6411137




      6411137






















          2 Answers
          2






          active

          oldest

          votes


















          1














          apt install will match substring regexes if the package name is given with ., ? or *, so



          sudo apt install php.*


          will install all packages with names containing php.



          (This isn’t a good idea.)






          share|improve this answer


























          • This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

            – JohnDoea
            Mar 2 at 9:32











          • No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

            – Stephen Kitt
            Mar 2 at 10:58





















          2














           apt-get install `apt-cache search php- | grep ^php- | cut '-d ' -f1`


          The result may not be pretty: on my debian + deb-multimedia system this finds 408 packages.






          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%2f503925%2fapt-install-all-php-packages-whatsoever%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            apt install will match substring regexes if the package name is given with ., ? or *, so



            sudo apt install php.*


            will install all packages with names containing php.



            (This isn’t a good idea.)






            share|improve this answer


























            • This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

              – JohnDoea
              Mar 2 at 9:32











            • No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

              – Stephen Kitt
              Mar 2 at 10:58


















            1














            apt install will match substring regexes if the package name is given with ., ? or *, so



            sudo apt install php.*


            will install all packages with names containing php.



            (This isn’t a good idea.)






            share|improve this answer


























            • This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

              – JohnDoea
              Mar 2 at 9:32











            • No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

              – Stephen Kitt
              Mar 2 at 10:58
















            1












            1








            1







            apt install will match substring regexes if the package name is given with ., ? or *, so



            sudo apt install php.*


            will install all packages with names containing php.



            (This isn’t a good idea.)






            share|improve this answer















            apt install will match substring regexes if the package name is given with ., ? or *, so



            sudo apt install php.*


            will install all packages with names containing php.



            (This isn’t a good idea.)







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 2 at 8:02

























            answered Mar 2 at 7:45









            Stephen KittStephen Kitt

            177k24402480




            177k24402480













            • This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

              – JohnDoea
              Mar 2 at 9:32











            • No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

              – Stephen Kitt
              Mar 2 at 10:58





















            • This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

              – JohnDoea
              Mar 2 at 9:32











            • No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

              – Stephen Kitt
              Mar 2 at 10:58



















            This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

            – JohnDoea
            Mar 2 at 9:32





            This will install all versions of php as well from 1.x-7.x and all their remaining extensions, right? This could be 1 gb or more if so.

            – JohnDoea
            Mar 2 at 9:32













            No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

            – Stephen Kitt
            Mar 2 at 10:58







            No, it can’t invent packages, so it won’t install PHP 1, 2 etc. In Debian 9 it will install PHP 7.0 and all available extensions (and debug packages if you have the debug repositories in your list of sources). You asked for a “command to install all PHP packages whatsoever”; this is such a command.

            – Stephen Kitt
            Mar 2 at 10:58















            2














             apt-get install `apt-cache search php- | grep ^php- | cut '-d ' -f1`


            The result may not be pretty: on my debian + deb-multimedia system this finds 408 packages.






            share|improve this answer






























              2














               apt-get install `apt-cache search php- | grep ^php- | cut '-d ' -f1`


              The result may not be pretty: on my debian + deb-multimedia system this finds 408 packages.






              share|improve this answer




























                2












                2








                2







                 apt-get install `apt-cache search php- | grep ^php- | cut '-d ' -f1`


                The result may not be pretty: on my debian + deb-multimedia system this finds 408 packages.






                share|improve this answer















                 apt-get install `apt-cache search php- | grep ^php- | cut '-d ' -f1`


                The result may not be pretty: on my debian + deb-multimedia system this finds 408 packages.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 2 at 6:51

























                answered Mar 2 at 6:45









                JasenJasen

                2,210813




                2,210813






























                    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%2f503925%2fapt-install-all-php-packages-whatsoever%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 make a Squid Proxy server?

                    Is this a new Fibonacci Identity?

                    19世紀