I'm trying to install php55 (or later) for my lan-server, but I can't seem to find a package that doesn't require internet to install...
(installation fails since I have no internet)

Where is there a reliable​ source for an offline installer??

  • You already have it. Apt will happily install packages offline. Use the same sources apt uses for your download...or packages.ubuntu.com – user535733 May 10 '17 at 11:58

On your offline machine run:

sudo apt-get install php5 --print-uris -y | grep -o http.*.deb

it will print all necessary stuff that are match to your running Ubuntu with all dependencies etc which you need to download. download all them at a machine with Internet connection.

Then move them to your offline machine in this path:


After all run:

sudo apt-get install php5

If your ubuntu machine sources have never been updated so it will not work for you. then try using an standalone utility like xampp:


Both php5 and php7 are available for Linux.

  • oh looks like archive.ubuntu.com/ubuntu/pool/main/p/php5/… is no longer available... there is 4.21 however, should I chance that and symlink it as 4.12 or just use the xampp method?? – Tcll May 10 '17 at 13:06
  • seems your sources are out of date, we can change sources.list in a running machine with an Internet connection to get working links however that might not work for you cause your system is not up to date, I would go with xampp, as I remember it comes with a lot of other utilities too. – Ravexina May 10 '17 at 13:21
  • yeah, it's not working anyways... I tried creating symlinks and it still tries to download. – Tcll May 10 '17 at 13:35
  • xampp worked, big thanks for all the help :) now to begin the grueling process of cleaning out the old site. XP – Tcll May 10 '17 at 13:56

In general, you should first download the package and then install it with

sudo dpkg --install package.deb

If there are multiple packages, e.g. because you need dependencies, you have to install them one by one. The concrete link to your package depends on which exact version you would like to use and whether you have a 32 or 64 bit system. A list of packages that are likely to fit is here: http://de.archive.ubuntu.com/ubuntu/pool/main/p/php5/

If you run sudo apt --print-uris install php on another 14.04, --print-uris will show the concrete uris to the packages you need to download and install.

EDIT This could be also helpful for you: How do I generate a package download list?


Visit the official Ubuntu (trusty) Download Page for php5_5.5.9+dfsg-1ubuntu4.21_all.deb webpage, and download the php5_5.5.9+dfsg-1ubuntu4.21_all.deb file. Double-click the file you downloaded to open it for installation in the Ubuntu Software Center, or open the terminal, change directories using cd to the directory containing the .deb file you downloaded and install it using this command:

sudo dpkg -i php5_5.5.9+dfsg-1ubuntu4.21_all.deb

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.