How to update Libzip to 1.2 on ubuntu 18.04 and PHP 7.2











up vote
3
down vote

favorite












I want to use ZipArchive::setEncryptionName on Ubuntu server 18.04.1 with PHP 7.2.7



Problem is that setEncryptionName needs a Libzip version of at least 1.2



Default configuration from PHP info:




  • Zip version 1.15.2

  • Libzip version 1.1.2


Commands that didn't help:




  • sudo apt-get update && sudo apt-get install libzip4

    libzip4 is already the newest version (1.1.2-1.1)


  • sudo apt-get install php-zip

    php-zip is already the newest version (1:7.2+60ubuntu1)











share|improve this question
























  • Did you ever get to solve this ?
    – Timothy
    Nov 20 at 9:24















up vote
3
down vote

favorite












I want to use ZipArchive::setEncryptionName on Ubuntu server 18.04.1 with PHP 7.2.7



Problem is that setEncryptionName needs a Libzip version of at least 1.2



Default configuration from PHP info:




  • Zip version 1.15.2

  • Libzip version 1.1.2


Commands that didn't help:




  • sudo apt-get update && sudo apt-get install libzip4

    libzip4 is already the newest version (1.1.2-1.1)


  • sudo apt-get install php-zip

    php-zip is already the newest version (1:7.2+60ubuntu1)











share|improve this question
























  • Did you ever get to solve this ?
    – Timothy
    Nov 20 at 9:24













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I want to use ZipArchive::setEncryptionName on Ubuntu server 18.04.1 with PHP 7.2.7



Problem is that setEncryptionName needs a Libzip version of at least 1.2



Default configuration from PHP info:




  • Zip version 1.15.2

  • Libzip version 1.1.2


Commands that didn't help:




  • sudo apt-get update && sudo apt-get install libzip4

    libzip4 is already the newest version (1.1.2-1.1)


  • sudo apt-get install php-zip

    php-zip is already the newest version (1:7.2+60ubuntu1)











share|improve this question















I want to use ZipArchive::setEncryptionName on Ubuntu server 18.04.1 with PHP 7.2.7



Problem is that setEncryptionName needs a Libzip version of at least 1.2



Default configuration from PHP info:




  • Zip version 1.15.2

  • Libzip version 1.1.2


Commands that didn't help:




  • sudo apt-get update && sudo apt-get install libzip4

    libzip4 is already the newest version (1.1.2-1.1)


  • sudo apt-get install php-zip

    php-zip is already the newest version (1:7.2+60ubuntu1)








package-management updates php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 3 at 21:04









zx485

1,45231114




1,45231114










asked Sep 3 at 20:42









Roman

162




162












  • Did you ever get to solve this ?
    – Timothy
    Nov 20 at 9:24


















  • Did you ever get to solve this ?
    – Timothy
    Nov 20 at 9:24
















Did you ever get to solve this ?
– Timothy
Nov 20 at 9:24




Did you ever get to solve this ?
– Timothy
Nov 20 at 9:24










1 Answer
1






active

oldest

votes

















up vote
1
down vote













(1) Locate a newer version of libzip and libzip-dev on Launchpad. Currently it's 1.5.1 under The Disco Dingo proposed (universe). Download the correct deb files (libzip-dev_1.5.1-0ubuntu1_amd64.deb and libzip5_1.5.1-0ubuntu1_amd64.deb).



(2) Install them with



sudo dpkg -i libzip-dev_1.5.1-0ubuntu1_amd64.deb libzip5_1.5.1-0ubuntu1_amd64.deb


They may be missing some dependencies, you can try to install them with apt first, so you don't need to download any more "incompatible" packages from Launchpad. Then rerun this command.



(3) Install php-zip. Install PEAR (PECL) to upgrade php-zip to a newer version. Also install php-dev required by PECL to build php-zip.



sudo apt install php-zip php-pear php-dev


(4) Upgrade php-zip to support the newer libzip.



sudo pecl install zip


(5) Probably you don't need the development libraries any more.



sudo apt purge php-dev libzip-deb
sudo apt autoremove


(6) See phpinfo() if you have the correct libzip version. You may need to restart your webserver.



To get back the original version (assuming you've used libzip5, and you don't need the previously installed packages):



sudo pecl uninstall zip
sudo apt purge php-pear libzip5 php-zip
sudo apt autoremove
sudo apt install php-zip





share|improve this answer























    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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2faskubuntu.com%2fquestions%2f1071789%2fhow-to-update-libzip-to-1-2-on-ubuntu-18-04-and-php-7-2%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    (1) Locate a newer version of libzip and libzip-dev on Launchpad. Currently it's 1.5.1 under The Disco Dingo proposed (universe). Download the correct deb files (libzip-dev_1.5.1-0ubuntu1_amd64.deb and libzip5_1.5.1-0ubuntu1_amd64.deb).



    (2) Install them with



    sudo dpkg -i libzip-dev_1.5.1-0ubuntu1_amd64.deb libzip5_1.5.1-0ubuntu1_amd64.deb


    They may be missing some dependencies, you can try to install them with apt first, so you don't need to download any more "incompatible" packages from Launchpad. Then rerun this command.



    (3) Install php-zip. Install PEAR (PECL) to upgrade php-zip to a newer version. Also install php-dev required by PECL to build php-zip.



    sudo apt install php-zip php-pear php-dev


    (4) Upgrade php-zip to support the newer libzip.



    sudo pecl install zip


    (5) Probably you don't need the development libraries any more.



    sudo apt purge php-dev libzip-deb
    sudo apt autoremove


    (6) See phpinfo() if you have the correct libzip version. You may need to restart your webserver.



    To get back the original version (assuming you've used libzip5, and you don't need the previously installed packages):



    sudo pecl uninstall zip
    sudo apt purge php-pear libzip5 php-zip
    sudo apt autoremove
    sudo apt install php-zip





    share|improve this answer



























      up vote
      1
      down vote













      (1) Locate a newer version of libzip and libzip-dev on Launchpad. Currently it's 1.5.1 under The Disco Dingo proposed (universe). Download the correct deb files (libzip-dev_1.5.1-0ubuntu1_amd64.deb and libzip5_1.5.1-0ubuntu1_amd64.deb).



      (2) Install them with



      sudo dpkg -i libzip-dev_1.5.1-0ubuntu1_amd64.deb libzip5_1.5.1-0ubuntu1_amd64.deb


      They may be missing some dependencies, you can try to install them with apt first, so you don't need to download any more "incompatible" packages from Launchpad. Then rerun this command.



      (3) Install php-zip. Install PEAR (PECL) to upgrade php-zip to a newer version. Also install php-dev required by PECL to build php-zip.



      sudo apt install php-zip php-pear php-dev


      (4) Upgrade php-zip to support the newer libzip.



      sudo pecl install zip


      (5) Probably you don't need the development libraries any more.



      sudo apt purge php-dev libzip-deb
      sudo apt autoremove


      (6) See phpinfo() if you have the correct libzip version. You may need to restart your webserver.



      To get back the original version (assuming you've used libzip5, and you don't need the previously installed packages):



      sudo pecl uninstall zip
      sudo apt purge php-pear libzip5 php-zip
      sudo apt autoremove
      sudo apt install php-zip





      share|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        (1) Locate a newer version of libzip and libzip-dev on Launchpad. Currently it's 1.5.1 under The Disco Dingo proposed (universe). Download the correct deb files (libzip-dev_1.5.1-0ubuntu1_amd64.deb and libzip5_1.5.1-0ubuntu1_amd64.deb).



        (2) Install them with



        sudo dpkg -i libzip-dev_1.5.1-0ubuntu1_amd64.deb libzip5_1.5.1-0ubuntu1_amd64.deb


        They may be missing some dependencies, you can try to install them with apt first, so you don't need to download any more "incompatible" packages from Launchpad. Then rerun this command.



        (3) Install php-zip. Install PEAR (PECL) to upgrade php-zip to a newer version. Also install php-dev required by PECL to build php-zip.



        sudo apt install php-zip php-pear php-dev


        (4) Upgrade php-zip to support the newer libzip.



        sudo pecl install zip


        (5) Probably you don't need the development libraries any more.



        sudo apt purge php-dev libzip-deb
        sudo apt autoremove


        (6) See phpinfo() if you have the correct libzip version. You may need to restart your webserver.



        To get back the original version (assuming you've used libzip5, and you don't need the previously installed packages):



        sudo pecl uninstall zip
        sudo apt purge php-pear libzip5 php-zip
        sudo apt autoremove
        sudo apt install php-zip





        share|improve this answer














        (1) Locate a newer version of libzip and libzip-dev on Launchpad. Currently it's 1.5.1 under The Disco Dingo proposed (universe). Download the correct deb files (libzip-dev_1.5.1-0ubuntu1_amd64.deb and libzip5_1.5.1-0ubuntu1_amd64.deb).



        (2) Install them with



        sudo dpkg -i libzip-dev_1.5.1-0ubuntu1_amd64.deb libzip5_1.5.1-0ubuntu1_amd64.deb


        They may be missing some dependencies, you can try to install them with apt first, so you don't need to download any more "incompatible" packages from Launchpad. Then rerun this command.



        (3) Install php-zip. Install PEAR (PECL) to upgrade php-zip to a newer version. Also install php-dev required by PECL to build php-zip.



        sudo apt install php-zip php-pear php-dev


        (4) Upgrade php-zip to support the newer libzip.



        sudo pecl install zip


        (5) Probably you don't need the development libraries any more.



        sudo apt purge php-dev libzip-deb
        sudo apt autoremove


        (6) See phpinfo() if you have the correct libzip version. You may need to restart your webserver.



        To get back the original version (assuming you've used libzip5, and you don't need the previously installed packages):



        sudo pecl uninstall zip
        sudo apt purge php-pear libzip5 php-zip
        sudo apt autoremove
        sudo apt install php-zip






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 30 at 8:42

























        answered Nov 28 at 19:48









        user1768761

        63110




        63110






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2faskubuntu.com%2fquestions%2f1071789%2fhow-to-update-libzip-to-1-2-on-ubuntu-18-04-and-php-7-2%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei