-
Apt-get Install Libzip-dev Libzip1카테고리 없음 2020. 2. 29. 13:09
OK – so after my last long post on how to downgrade Ubuntu Lucid 10.04 back to PHP 5.2 (which happened to be version 5.2.10), I wasn’t to satisfied with this plan. Afterall, what is the point of going backwards for every site if you don’t need to?Well, after I reverted back to PHP 5.2 on Ubuntu 10.04 Lucid, I wanted to research this topic a bit further.Alas, I read several HOW-TO pages and found out how to install both PHP 5.2 and 5.3 on Ubuntu Lucid 10.04 so that they both work at the SAME TIME! Yes, the same time!
No need to remove one and start the other when needing to use it.The catch is – one of them has to be run in fastcgi mode. No big deal though.So, if you followed my other post on how to revert back to PHP 5.2 on Ubuntu 10.04, you will need to do the following before continuing with the next instructions.
Libzip So 4
If you did not revert back to PHP 5.2, you do not need this.1. Simply go into the /etc/apt/sources.list.d folder and delete that file you created that pulled items from the Karmic repositories. My file was just called karmic.list.2. Now go into the /etc/apt/preference.d folder and delete the file you created which listed all of your preferences for packages you wanted only pulled from Karmic. Mine was just called “php” so I deleted this file.3. Now, just perform the following command and it will download PHP 5.3.2 included with Ubuntu Lucid 10.04 and any other updates that you may need:sudo apt-get update && sudo apt-get upgradeNow install all of those items!OK, so if you did not follow a guide on how to downgrade to PHP 5.2 in Ubuntu 10.04 Lucid, you start here!At the time of this writing, the newest version of PHP 5.2 is PHP 5.2.14. Heck, even that is an upgrade over the Karmic version of PHP 5.2.10 that was installed previously!Now do not let these instructions get the better of you. They are pretty simple to follow. You have to install some development packages to allow PHP 5.2.14 to build and be used. I tried to remove these after I finished compiling and installing PHP 5.2.14, but then I began receiving Internal Server Error messages on the one site that needs the old version.While you may not need all of these packages below, I did in order to replicate the same modules and configuration that I was using.
Package 'php-zip' Has No Installation Candidate
Note that this DOES NOT include imagick – which I could not get installed. But, I haven’t noticed any problems with the site without this installed.First, install the needed dependencies. Some of these may already be installed:sudo apt-get install curl libcurl4-openssl-dev libcurl3 libcurl3-gnutls zlib1g zlib1g-dev libzip-dev libzip1 libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev libbz2-dev libmcrypt-dev libmcrypt4 libc-www007e libmysqlclient15-devThis will install all of the dependencies you need to install PHP 5.2.14 on Ubuntu Lucid 10.04.OK, now that those are installed, you need to head over to the and download the version of PHP you want to use.
Make sure you download the TAR.GZ version and NOT the TAR.BZ2 if you are following my tutorial.Now after you have it downloaded, you need to move it to the proper directory. Now because I didn’t want all kinds of files scattered throughout the server drive, I installed everything in the /opt location. So, move your newly-downloaded file to that directory:sudo mv php-5.
/optOK, so that is moved. Now you need to go to that directory and untar the file:cd /optsudo tar xvf php-5.That should then create a new directory. If you are installing PHP 5.2.14, it will be the php-5.2.14 directory. So change the directory (cd) into that folder.cd php-5.2.OPTIONAL: If you want to install the Suhosin Hardening Patch (which is installed be default with Ubuntu releases), you need to download this patch file:sudo wget gunzip suhosin.patch -p 1 -i suhosin.Now, this is the part where most people take a big gulp and think they cannot compile PHP from source. This is how you compile PHP 5.2.14 from source on Ubuntu 10.04 Lucid. Of course, it really helps when you know what to type in!
So, copy or type in the following large command.
Above command will download the package lists for Ubuntu 16.04 on your system.