While trying to install in debian, shows libssl-dev dependency needed

apt-get install php5-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5-dev : Depends: libssl-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Installing libssl-dev package needed dependency zlib1g-dev. Installing zliblg-dev package have unment dependencies,

The following packages have unmet dependencies:
 zlib1g-dev : Depends: zlib1g (= 1: but 1:1.2.7.dfsg-13 is to be installed

How do install zlib1g-dev package to install dev5-php?

  • Try with aptitude to install libssl-dev Feb 6, 2016 at 12:20

3 Answers 3


You can install it by typing:

su -c 'aptitude install libssl-dev'

If not done please share output of

apt-cache show libssl-dev

Post your texts from directory: /etc/apt/sources.list to see if the repository list would suffice or not. See the link, this may be worth seeing.


I have added the below lines in the repository file:/etc/apt/sources.list

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://http.us.debian.org/debian jessie main contrib non-free

After update: apt-get update with the above added lines, I could able to install the php5-dev package successfully!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.