How to install libzip 1.2 on Debian as well as OSx via homebrew?

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











up vote
1
down vote

favorite
1












I want to use http://php.net/manual/en/ziparchive.setencryptionname.php but this relies on libzip version 1.2 being available.
On Debian, a $ dpkg -s libzip-dev prints



Package: libzip-dev
Status: install ok installed
[...]
Source: libzip
Version: 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624
Depends: libzip4 (= 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624), zlib1g-dev


For encryption to be available, I nee libzip >= 1.2. How do I get that?



Same problem applies to my local dev machine where I have PHP installed via homebrew as well as libzip which is listed as being version 1.3.0:



$ brew install libzip
> Warning: libzip 1.3.0 is already installed


What do I have to do in both cases?







share|improve this question




















  • Did you ever figure out how to do this? I have the same problem.
    – Tom
    Jun 20 at 19:48






  • 1




    unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
    – Adrian Föder
    Jun 21 at 10:23















up vote
1
down vote

favorite
1












I want to use http://php.net/manual/en/ziparchive.setencryptionname.php but this relies on libzip version 1.2 being available.
On Debian, a $ dpkg -s libzip-dev prints



Package: libzip-dev
Status: install ok installed
[...]
Source: libzip
Version: 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624
Depends: libzip4 (= 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624), zlib1g-dev


For encryption to be available, I nee libzip >= 1.2. How do I get that?



Same problem applies to my local dev machine where I have PHP installed via homebrew as well as libzip which is listed as being version 1.3.0:



$ brew install libzip
> Warning: libzip 1.3.0 is already installed


What do I have to do in both cases?







share|improve this question




















  • Did you ever figure out how to do this? I have the same problem.
    – Tom
    Jun 20 at 19:48






  • 1




    unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
    – Adrian Föder
    Jun 21 at 10:23













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I want to use http://php.net/manual/en/ziparchive.setencryptionname.php but this relies on libzip version 1.2 being available.
On Debian, a $ dpkg -s libzip-dev prints



Package: libzip-dev
Status: install ok installed
[...]
Source: libzip
Version: 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624
Depends: libzip4 (= 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624), zlib1g-dev


For encryption to be available, I nee libzip >= 1.2. How do I get that?



Same problem applies to my local dev machine where I have PHP installed via homebrew as well as libzip which is listed as being version 1.3.0:



$ brew install libzip
> Warning: libzip 1.3.0 is already installed


What do I have to do in both cases?







share|improve this question












I want to use http://php.net/manual/en/ziparchive.setencryptionname.php but this relies on libzip version 1.2 being available.
On Debian, a $ dpkg -s libzip-dev prints



Package: libzip-dev
Status: install ok installed
[...]
Source: libzip
Version: 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624
Depends: libzip4 (= 1.1.3-1+0~20170825111722.1+jessie~1.gbp254624), zlib1g-dev


For encryption to be available, I nee libzip >= 1.2. How do I get that?



Same problem applies to my local dev machine where I have PHP installed via homebrew as well as libzip which is listed as being version 1.3.0:



$ brew install libzip
> Warning: libzip 1.3.0 is already installed


What do I have to do in both cases?









share|improve this question











share|improve this question




share|improve this question










asked Nov 6 '17 at 10:23









Adrian Föder

1061




1061











  • Did you ever figure out how to do this? I have the same problem.
    – Tom
    Jun 20 at 19:48






  • 1




    unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
    – Adrian Föder
    Jun 21 at 10:23

















  • Did you ever figure out how to do this? I have the same problem.
    – Tom
    Jun 20 at 19:48






  • 1




    unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
    – Adrian Föder
    Jun 21 at 10:23
















Did you ever figure out how to do this? I have the same problem.
– Tom
Jun 20 at 19:48




Did you ever figure out how to do this? I have the same problem.
– Tom
Jun 20 at 19:48




1




1




unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
– Adrian Föder
Jun 21 at 10:23





unfortunately not @tom; I am even not sure what I eventually did. I guess it was for local (unit) testing and I just let it be…
– Adrian Föder
Jun 21 at 10:23











1 Answer
1






active

oldest

votes

















up vote
0
down vote













You must be running a very old version of Debian. I'm running recent Ubuntu, which derives from Debian + here's what I see...



lxd: net11-zesty # dpkg -l | grep zlib
ii zlib1g:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - development


So to fix your Debian install, upgrade Debian + latest zlib will install.



I you must build from scratch, use the LFS Build Instructions + be aware of problems. If you install zlib-1.2 over the top of your system zlib-1.3, likely you'll have many problems + may break your reboots.



Install this library someplace like /opt or /usr/local + build your PHP extension from source, using the zlib-1.2 install directory.



For your local machine, you'll do the same. I'm guessing your using Macs, since you mention brew. You'll have to be very careful here also, as trying to build one new library, hopefully will trigger rebuilding or relinking all code which depends on this library.



I use Macports as the dependency mechanism seems to work better.



If I were using brew, I'd like remove all code installed by brew + reinstall all brew built code. This should pick up all latest code, including zlib.



Last item. Since your trying to build a PHP extension, I'd strongly suggest you'll save your time + sanity by starting with a fresh, updated OS (like Ubuntu Zesty) + LAMP Stack, so you have latest Apache-2.4.29 + PHP-7.1.11 as your starting point. Then you can just install packages from normal PPAs + your problem will resolve itself with no source building.






share|improve this answer




















  • thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
    – Adrian Föder
    Nov 6 '17 at 14:02










  • The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
    – David Favor
    Nov 7 '17 at 14:31










  • I think you confuse zlib with libzip?
    – Adrian Föder
    Nov 8 '17 at 11:36










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%2f402802%2fhow-to-install-libzip-1-2-on-debian-as-well-as-osx-via-homebrew%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You must be running a very old version of Debian. I'm running recent Ubuntu, which derives from Debian + here's what I see...



lxd: net11-zesty # dpkg -l | grep zlib
ii zlib1g:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - development


So to fix your Debian install, upgrade Debian + latest zlib will install.



I you must build from scratch, use the LFS Build Instructions + be aware of problems. If you install zlib-1.2 over the top of your system zlib-1.3, likely you'll have many problems + may break your reboots.



Install this library someplace like /opt or /usr/local + build your PHP extension from source, using the zlib-1.2 install directory.



For your local machine, you'll do the same. I'm guessing your using Macs, since you mention brew. You'll have to be very careful here also, as trying to build one new library, hopefully will trigger rebuilding or relinking all code which depends on this library.



I use Macports as the dependency mechanism seems to work better.



If I were using brew, I'd like remove all code installed by brew + reinstall all brew built code. This should pick up all latest code, including zlib.



Last item. Since your trying to build a PHP extension, I'd strongly suggest you'll save your time + sanity by starting with a fresh, updated OS (like Ubuntu Zesty) + LAMP Stack, so you have latest Apache-2.4.29 + PHP-7.1.11 as your starting point. Then you can just install packages from normal PPAs + your problem will resolve itself with no source building.






share|improve this answer




















  • thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
    – Adrian Föder
    Nov 6 '17 at 14:02










  • The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
    – David Favor
    Nov 7 '17 at 14:31










  • I think you confuse zlib with libzip?
    – Adrian Föder
    Nov 8 '17 at 11:36














up vote
0
down vote













You must be running a very old version of Debian. I'm running recent Ubuntu, which derives from Debian + here's what I see...



lxd: net11-zesty # dpkg -l | grep zlib
ii zlib1g:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - development


So to fix your Debian install, upgrade Debian + latest zlib will install.



I you must build from scratch, use the LFS Build Instructions + be aware of problems. If you install zlib-1.2 over the top of your system zlib-1.3, likely you'll have many problems + may break your reboots.



Install this library someplace like /opt or /usr/local + build your PHP extension from source, using the zlib-1.2 install directory.



For your local machine, you'll do the same. I'm guessing your using Macs, since you mention brew. You'll have to be very careful here also, as trying to build one new library, hopefully will trigger rebuilding or relinking all code which depends on this library.



I use Macports as the dependency mechanism seems to work better.



If I were using brew, I'd like remove all code installed by brew + reinstall all brew built code. This should pick up all latest code, including zlib.



Last item. Since your trying to build a PHP extension, I'd strongly suggest you'll save your time + sanity by starting with a fresh, updated OS (like Ubuntu Zesty) + LAMP Stack, so you have latest Apache-2.4.29 + PHP-7.1.11 as your starting point. Then you can just install packages from normal PPAs + your problem will resolve itself with no source building.






share|improve this answer




















  • thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
    – Adrian Föder
    Nov 6 '17 at 14:02










  • The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
    – David Favor
    Nov 7 '17 at 14:31










  • I think you confuse zlib with libzip?
    – Adrian Föder
    Nov 8 '17 at 11:36












up vote
0
down vote










up vote
0
down vote









You must be running a very old version of Debian. I'm running recent Ubuntu, which derives from Debian + here's what I see...



lxd: net11-zesty # dpkg -l | grep zlib
ii zlib1g:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - development


So to fix your Debian install, upgrade Debian + latest zlib will install.



I you must build from scratch, use the LFS Build Instructions + be aware of problems. If you install zlib-1.2 over the top of your system zlib-1.3, likely you'll have many problems + may break your reboots.



Install this library someplace like /opt or /usr/local + build your PHP extension from source, using the zlib-1.2 install directory.



For your local machine, you'll do the same. I'm guessing your using Macs, since you mention brew. You'll have to be very careful here also, as trying to build one new library, hopefully will trigger rebuilding or relinking all code which depends on this library.



I use Macports as the dependency mechanism seems to work better.



If I were using brew, I'd like remove all code installed by brew + reinstall all brew built code. This should pick up all latest code, including zlib.



Last item. Since your trying to build a PHP extension, I'd strongly suggest you'll save your time + sanity by starting with a fresh, updated OS (like Ubuntu Zesty) + LAMP Stack, so you have latest Apache-2.4.29 + PHP-7.1.11 as your starting point. Then you can just install packages from normal PPAs + your problem will resolve itself with no source building.






share|improve this answer












You must be running a very old version of Debian. I'm running recent Ubuntu, which derives from Debian + here's what I see...



lxd: net11-zesty # dpkg -l | grep zlib
ii zlib1g:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - runtime
ii zlib1g-dev:amd64 1:1.2.11.dfsg-0ubuntu1 amd64 compression library - development


So to fix your Debian install, upgrade Debian + latest zlib will install.



I you must build from scratch, use the LFS Build Instructions + be aware of problems. If you install zlib-1.2 over the top of your system zlib-1.3, likely you'll have many problems + may break your reboots.



Install this library someplace like /opt or /usr/local + build your PHP extension from source, using the zlib-1.2 install directory.



For your local machine, you'll do the same. I'm guessing your using Macs, since you mention brew. You'll have to be very careful here also, as trying to build one new library, hopefully will trigger rebuilding or relinking all code which depends on this library.



I use Macports as the dependency mechanism seems to work better.



If I were using brew, I'd like remove all code installed by brew + reinstall all brew built code. This should pick up all latest code, including zlib.



Last item. Since your trying to build a PHP extension, I'd strongly suggest you'll save your time + sanity by starting with a fresh, updated OS (like Ubuntu Zesty) + LAMP Stack, so you have latest Apache-2.4.29 + PHP-7.1.11 as your starting point. Then you can just install packages from normal PPAs + your problem will resolve itself with no source building.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 6 '17 at 13:13









David Favor

33014




33014











  • thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
    – Adrian Föder
    Nov 6 '17 at 14:02










  • The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
    – David Favor
    Nov 7 '17 at 14:31










  • I think you confuse zlib with libzip?
    – Adrian Föder
    Nov 8 '17 at 11:36
















  • thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
    – Adrian Föder
    Nov 6 '17 at 14:02










  • The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
    – David Favor
    Nov 7 '17 at 14:31










  • I think you confuse zlib with libzip?
    – Adrian Föder
    Nov 8 '17 at 11:36















thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
– Adrian Föder
Nov 6 '17 at 14:02




thank you very much for your elaborate answer. However, $ dpkg -l | grep zlib gives 1:1.2.8.dfsg-2+b1 on my system as well; but I am looking for libzip being at version 1.2. Is it maybe just not available when looking at packages.debian.org/de/jessie/libzip-dev ?
– Adrian Föder
Nov 6 '17 at 14:02












The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
– David Favor
Nov 7 '17 at 14:31




The above says you have v1.2.8 installed. If you're saying your tried to downlevel to install a bugger v1.2.0 version... not recommended... Your OS version will contain fixes which zlib should have installed, as so many packages rely on zlib. If you downlevel zlib, then you'll be reinstalling fixed bugs.
– David Favor
Nov 7 '17 at 14:31












I think you confuse zlib with libzip?
– Adrian Föder
Nov 8 '17 at 11:36




I think you confuse zlib with libzip?
– Adrian Föder
Nov 8 '17 at 11:36

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402802%2fhow-to-install-libzip-1-2-on-debian-as-well-as-osx-via-homebrew%23new-answer', 'question_page');

);

Post as a guest













































































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