just a quick question, Im running PHP5 on my debian server (squeeze), due to some magento extension requirement, I need to install the php5-xls module, this is a PRODUCTION ENVIRONMENT, so, after a "apt-get install php5-xls", obviously I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libapache2-mod-php5 libxslt1.1 php5-cli php5-common php5-curl php5-gd php5-mcrypt
php5-mysql
Suggested packages:
php-pear
The following NEW packages will be installed:
libxslt1.1 php5-xsl
The following packages will be upgraded:
libapache2-mod-php5 php5-cli php5-common php5-curl php5-gd php5-mcrypt php5-mysql
7 upgraded, 2 newly installed, 0 to remove and 59 not upgraded.
Need to get 6,953 kB of archives.
After this operation, 606 kB of additional disk space will be used.
Do you want to continue [Y/n]?
I've used Linux for some time and Ive seen things crashing down for simple things like this, I just want to know how much am I risking my current PHP installation by hitting the "y" key....we are running online-shops here..is there a more secure way ?
Thanks in advance...!
Then install a development server. We can not assure you things will go right. As I personally think, it will go fine. It upgrades previous installs, and installs 2 new packages.
Related
When trying to execute 'apt-get install php5-curl" following error accurs
The following packages have unmet dependencies:
php5-curl : Depends: php5-common (= 5.6.33+dfsg-0+deb8u1) but 5.6.40+dfsg-0+deb8u8 is to be installed
Any Idea how to fix this?
PHP 5 has been officially unsupported for over a year by now - I think you're going to struggle to resolve dependencies. Even Jessie (the only version still shipping PHP 5 by default, which you seem to be using) becomes unsupported within a few months of now.
Your best long-term plan is to plan your code's upgrade to compatibility with PHP 7.4
Because the security repository is missing / disabled on your `sources.list.
php5-curl is available on the security repository.
You should add the following line to your /etc/apt/sources.list :
deb http://security.debian.org/debian-security jessie/updates main
Then :
sudo apt update
sudo apt upgrade
sudo apt install php5-curl
2 of my sites are not working bcs I can't install php5-gd library to Debian Wheezy php5.6 ...
I tried
aptitude install php5-gd, and system said i miss 2 dependencies, which i can not find or install...
aptitude install php5-gd
sudo apt-get install php5-gd
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-gd :
Depends: libt1-5 (>= 5.1.0) but it is not installable
Depends: libvpx1 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
Have you updated your apt-get first?
First, run:
sudo apt-get update
Then if that is successful run;
sudo apt-get upgrade
if you run
df -lah
first, it may show your /boot is at 100%
Try;
sudo apt-get autoremove
then start from the start, and then try your php5-gd
When that fails
Try :
sudo apt-get install -f
Wheezy is really out of date. It was released in 2013 and its support ended in 2018.
Here's a table imported from the Debian Long Term Support page:
Your best bet is to upgrade to buster (Debian 10, released July 2019 and (probably) supported through 2024.
Another option is to upgrade to jessie (released April 2015, security support ended 2018, community support ends June 2020), which would buy you a few months to replace your system with a newer one.
The final option, if you really need to stay on Wheezy, is to use backports or a carefully-pinned newer release for just the packages in question.
Since Wheezy is so old, there aren't any repositories still being hosted (there's probably an archive of it somewhere, but you won't get updates). I'll walk you through upgrading to Jessie and using its backports instead.
These instructions should work for any release, so you could (should!) use buster in place of jessie, though upgrading across so many releases will almost certainly require quite a bit of work.
1. Update your sources:
$ find /etc/apt/sources.list* -name '*.list' |sudo xargs sed -i 's/wheezy/jessie/g'
2. Add Jessie backports to one of those files if it doesn't yet exist:
deb http://deb.debian.org/debian jessie-backports main
3. Update and upgrade, ideally from outside X11 (e.g. the console at Ctrl+Alt+F2):
$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get autoremove
$ sudo reboot
After that, you can then try to troubleshoot your system.
You should build it manually
From:
https://www.howtoforge.com/building-php-5.4-from-source-on-debian-squeeze
I'm trying to install GMP on Ubuntu 14.04:
$ sudo apt-get install php5-gmp
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-gmp : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.17+dfsg-2+deb.sury.org~precise+1 is to be installed
E: Unable to correct problems, you have held broken packages.
Why is it not letting me install this?
somehow you have installed a special version of php-common (= 5.5.17+dfsg-2+deb.sury.org~precise+1)
try to
apt-get remove php5-common
and then install again.
Your installation appears to be broken by php5-common-5.5.17+dfsg-2+deb.sury.org~precise+1 package installed from some alien repo.
Try to start with:
sudo apt-search php5
remove everything looking suspicious and then reinstall it from the official repo. I think, simple removal of this alien common and reinstalling gmp might resolve an issue.
I am trying to install php5-sqlite on Ubuntu 14.04, but this error occurs:
The following packages have unmet dependencies:
php5-sqlite : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.4) but 5.5.16+dfsg-1+deb.sury.org~precise+2 is to be installed
E: Unable to correct problems, you have held broken packages.
How do I resolve this error? I have upgraded my Ubuntu server from 12.04 to the current 14.04 previously.
I've met the same problem today. There are two ways to resolve it:
use aptitude to help you resolve all the dependency problems,
sudo aptitude install php5-sqlite
if you haven't install aptitude, install it:
sudo apt-get install aptitude
it will give you the option to downgrade the library file to an earlier version
download the proper version of php5-common (and related packages if necessary) from launchpad, use dpkg -i package to install it, then install php5-sqlite.
I highly recommend the second approach.
the accepted answer from #jfly didn't work for me, however, this answer helped resolve the issue by first uninstalling all the old php packages and then reinstalling them.
remove:
sudo apt-get remove php5 php5-common php5-mysql php5-xmlrpc php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc php-pear php5-dev php5-imap php5-mcrypt php5-sqlite
install:
sudo apt-get install php5 php5-mysql php-pear php5-gd php5-mcrypt php5-curl php5-sqlite
This means you have one source file not upgraded to the latest repo.
Either use apt-pinning to tell apt which source to prefere or make sure all your sources are up to date. You might need to do both :-)
Please also note that this question is rather off-topic on SO because 1. it doesn't involve programing 2. askubuntu.com is the stackexchange platform for ubuntu questions.
I have already installed the apache2 on my raspberry pi (raspbian OS) when setting up a svn server. Now I want to add a web server running php and mysql. What is the best way to do this without messing with any existing configurations on my apache2?
Would this be okay to execute on command line or is this package overwriting my existing apache2 install:
$ sudo apt-get install php5-common libapache2-mod-php5 php5-cli
The package in question is 'libapache2-mod-php5'.
Cheers
First of all, I've never worked with Raspberry Pi, but will try to give an answer. As you're only installing a module for apache and you're using the prefork compiled version (which is still default if I'm not mistaken). I think there will be no alterations in the configuration, perhaps only some rules will be added to handle PHP files.
To check if you're using Prefork, run this on command line (works on regular linux distributions):
apache2 -l
If you can find prefork.c in the list, I guess you're safe.
Please note that this is from personal experience with default unix distributions! I have never worked with Raspberry Pi (yet).
If you run the following commands all the dependencies will be resolved (it will also install libapache2-mod-php5). You can read about LAMP install in Raspberry Pi in the chapter 8 "A LAMP of Your Own", of the book "Learn Raspberry Pi with Linux", by Peter Membrey and David Hows, Apress, 2012.
$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
heirloom-mailx libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.5
mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
heirloom-mailx libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.5
mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 13 newly installed, 0 to remove and 84 not upgraded.
Need to get 9,770 kB of archives.
After this operation, 91.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?
...
$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-mpm-prefork libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common
Suggested packages:
php-pear
The following packages will be REMOVED:
apache2-mpm-worker
The following NEW packages will be installed:
apache2-mpm-prefork libapache2-mod-php5 libonig2 libqdbm14 php5 php5-cli php5-common
0 upgraded, 7 newly installed, 1 to remove and 84 not upgraded.
Need to get 5,707 kB of archives.
After this operation, 16.3 MB of additional disk space will be used.
Do you want to continue [Y/n]?
I think If you install php module for apache and php 5 with above apt-get command will enable the php support for apache but still this also depends on the linux version you are using on,because there seems to be some bugs in php.ini file on apache integration in ubuntu(v10.04) but ubuntu(v12.04)seems fine