I've completely destroyed everything and now php wont install.  I had php5.4 and everything was great.  I then needed to run Magento locally which wasnt working.  I saw one of the requirements was php5.3 so I downgraded using a script i found online but then PDO wasnt working.   I stuffed about for a few hours following what people said online, eventually nothing was working so i purged php to do a fresh install of php5.4 to start again from scratch and figure out my problems.  After i purged, i came to reinstall Php5 using apt-get install php5. Once the script ran i got the following output:  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 : Depends: libapache2-mod-php5 (&gt;= 5.4.9-4ubuntu2.4) but 5.3.10-1ubuntu3 is to     be installed or                  libapache2-mod-php5filter (&gt;= 5.4.9-4ubuntu2.4) but it is not going to be installed or              php5-cgi (&gt;= 5.4.9-4ubuntu2.4) but it is not going to be installed or              php5-fpm (&gt;= 5.4.9-4ubuntu2.4) but it is not going to be installed     Depends: php5-common (&gt;= 5.4.9-4ubuntu2.4) but 5.3.10-1ubuntu3 is to be installed E: Unable to correct problems, you have held broken packages.   I then googled for ages and ran commands like clean, update, upgrade, -f install and a few others. I come back to install php and i get the same error.  How can I reinstall Php so it works again.
466
Occasionally, when I'm installing stuff, I get an error like the following:  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:  package1 : Depends: package2 (&gt;= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?
8139
I have a Drupal site 8.6.10 on an Ubuntu server 18.04 with MySQL 5.7.25  I want to update MySQL to version 8.0  Here are the steps I followed :   I backed up my database. I uninstalled MySQL from my server with the commands :  $ sudo systemctl stop mysql $ sudo apt remove mysql-* $ sudo apt purge mysql-* $ sudo apt autoremove $ sudo dpkg -l | grep mysql | grep ii  I added the repository with the command :  $ wget https://repo.mysql.com//mysql-apt-config_0.8.12-1_all.deb  I installed the package with the command :  $ sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb            My problem :   I install MySQL with the command :  $ sudo apt update $ sudo apt install mysql-server    When I do step 5, it installs MySQL 5.7 why does not it install version 8 ?
104322
I need to downgrade my PHP version from 5.5.9 to 5.4 (using Ubuntu 14.04), because I have a code that's using mySQL (which is deprecated in 5.5.9), and I cannot change that code. Is there a way to do it?  *I tried the other threads that I saw about that issue in the site, but I couldn't find anything that helped me.
100357
After upgrading to MacOS High Sierra, I haven't been able to access my localhost. I tried restarting Apache, but it still didn't work. So I did apachectl configtest and got this error message:     httpd: Syntax error on line 544 of /private/etc/apache2/httpd.conf:   Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf:   Cannot load /usr/local/php5/libphp5.so into server:   dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _environ\n    Referenced from: /usr/local/php5/libphp5.so\n  Expected in:   /usr/sbin/httpd\n   Line 544 of my httpd.conf file is Include /private/etc/apache2/other/*.conf  The +php-osx.conf is an alias to entropy-php.conf, and line 8 of that file is LoadModule php5_module        /usr/local/php5/libphp5.so  The remaining lines of entropy-php.conf are: LoadModule php5_module /usr/local/php5/libphp5.so  &lt;IfModule mod_php5.c&gt;      AddType application/x-httpd-php .php     AddType application/x-httpd-php-source .phps      &lt;IfModule mod_dir.c&gt;         DirectoryIndex index.html index.php     &lt;/IfModule&gt;  &lt;/IfModule&gt;   I am using Apache/2.4.28 (Unix) and PHP 5.6.30.  Everything was working fine until the update. I have searched online for any solution this issue, but to no avail. Someone posted a similar question here a couple of years ago regarding the same syntax error, however, he didn't provide enough details or any follow-up regarding his setup, and no solution could be offered:
19729
I'm running ubuntu 14.04. I cannot use software center to install anything, even a local deb package so I have to rely on Terminal.  Recently I was trying to install mysql-server which generated error which I could pin-point was the required version of libstdc++6 . My system had 4.8.x while mysql 5.6 required >=4.9. Trying the usual upgrading process and unsuccessful, I consulted my sys admin, who tried installing the 4.9 package manually(using a local .deb package), which failed as well citing unmet dependencies.   At present, what I have is a system with error saying no new software can be installed.  The sudo apt-get install -f gives following output:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... failed. The following packages have unmet dependencies:  libstdc++6 : Depends: gcc-4.9-base (= 4.9.2-10) but 4.9.1-0ubuntu1 is installed  libstdc++6:i386 : Depends: gcc-4.9-base:i386 (= 4.9.2-10) but 4.9.1-0ubuntu1 is installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   I checked for held packages using  dpkg -l | grep ^h dpkg -l | grep hold   Result: nothing.  Also tried to find the broken package, if any but the file  /var/log/dist-upgrade/apt.log doesn't exist.  So, what should/can I do now.
52056
PHP 7 came out  and I would like to give it a try.  PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as  Improved performance: PHP 7 is up to twice as fast as PHP 5.6 Significantly reduced memory usage Abstract Syntax Tree Consistent 64-bit support Improved Exception hierarchy Many fatal errors converted to Exceptions Secure random number generator Removed old and unsupported SAPIs and extensions The null coalescing operator (??) Return and Scalar Type Declarations Anonymous Classes Zero cost asserts     Is that possible to install it on current Ubuntu version? Is there any current limitations or known compatibility issues?
22607
Accidentally executed this command and now many of my programs are not working.  sudo apt-get --purge remove libstdc++6   sudo apt now not working and some other stuff.  How do I revert this?  Distributor ID: Ubuntu Description:    Ubuntu 16.04.4 LTS Release:        16.04 Codename:       xenial   edit  I followed melebius by installing via dpkg -i ,libstdc++6 and it seems successful   root@server:~# sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb Selecting previously unselected package libstdc++6:amd64. (Reading database ... 71540 files and directories currently installed.) Preparing to unpack libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb ... Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.10) ... Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.10) ... Processing triggers for libc-bin (2.23-0ubuntu10) ...   But when i tried to install something i get this error  root@server:~# sudo apt-get screen apt-get: error while loading shared libraries: liblz4.so.1: cannot open shared object file: No such file or directory root@server:~#
12096
I have gcc 7.3.0 on Ubuntu 18.04. But I am working on a project where I need gcc less than version 6. When I tried to install gcc 5.4 using sudo apt install gcc-5.4, I got this error:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package gcc-5.4 E: Couldn't find any package by glob 'gcc-5.4' E: Couldn't find any package by regex 'gcc-5.4'     What is the appropriate way to install gcc 5.4?
20789
I have accidentally removed apt-get, how do I reinstall it?  $ sudo apt-get update sudo: apt-get: command not found  $ sudo dpkg-reconfigure apt /usr/sbin/dpkg-reconfigure: apt is broken or not fully installed    I would like to mention I do not want to reinstall Linux!
110652
curl -sS https://getcomposer.org/installer | sudo php -- --install- dir=/usr/local/bin --filename=composer    When I run the above command in terminal I got this this response:  Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again:  The json extension is missing. Install it or recompile php without --disable-json  The phar extension is missing. Install it or recompile php without --disable-phar  The iconv OR mbstring extension is required and both are missing. Install either of them or recompile php without --disable-iconv
10760
My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.  This is the error I see when trying to install/reinstall it:  Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ... Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                    Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.  EDIT: Looks like I'm not the only one:
75201
I wanted to get a look at MySQL 5.6 on Ubuntu 14.04 just out of curiosity. And based on  it certainly looked like installation should be simple and straightforward. So I fired up an AWS EC2 micro server running Ubuntu 14.04 (64-bit), logged into my pristine instance (via PuTTY), and issued the following commands:  $ sudo apt-get update $ sudo apt-get build-dep mysql-server-5.6 $ sudo apt-get install mysql-server-5.6   (The first two commands were desperation moves, since simply running apt-get install alone had previously not worked. But even with all three commands, the install step still did not work.)  At the point where I expected, based on the article referenced above, to see this output from the final command:  mysql start/running, process 2355   Setting up libhtml-template-perl (2.95-1) ...   Setting up mysql-common-5.6 (5.6.16-1~exp1) ...   Processing triggers for libc-bin (2.19-0ubuntu6) ...   Processing triggers for ureadahead (0.100.0-16) ...     I got this instead:  start: Job failed to start   invoke-rc.d: initscript mysql, action "start" failed.   dpkg: error processing package mysql-server-5.6 (--configure):    subprocess installed post-installation script returned error exit status 1   Setting up libhtml-template-perl (2.95-1) ...   Setting up mysql-common-5.6 (5.6.16-1~exp1) ...   Processing triggers for libc-bin (2.19-0ubuntu6) ...   Processing triggers for ureadahead (0.100.0-16) ...   Errors were encountered while processing:    mysql-server-5.6   E: Sub-process /usr/bin/dpkg returned an error code (1)   Can anyone see what went wrong?
118672
I am totally new in linux/ubuntu I am trying to setup lamp on my OS, however I've installed apache , php , mysql by following commands:  sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql sudo apt-get install phpmyadmin   everything works fine except that i totally cannot log into MySQL(which leads to phpmyadmin failure login) getting the errors :   #1045 Cannot log in to the MySQL server Access denied for user 'root'@'localhost' (using password: YES)   I googled the problem and also I have tried to reinstall  all installed components, but the same result came up!   in windows i usually modified the content of mysql configure file but in ubuntu nothing is as same as windows!:)  can anybody help me on this, really need to setup lampp :-S  thanks in advanced
71435
I've got problems with installing PHP 5.5.13 (last stable build) on a CentOS 6.5 (64 bit) machine, through yum.   It is not a part of the CentOS, EPEL or REMI repos as far as I can see. I get 5.4.29 with either of those repositories.
102518
Yes, I'm a moron, and I tried to manually install a higher point release of python 2.7.16 to /usr/bin/  (i did ./configure --prefix=/usr) on my Ubuntu 16.04 machine. It seems to work fine EXCEPT for packages that depended on python, like apt-listchanges, which fails with messages like ImportError: No module named apt_pkg  there's no make uninstall available, I've tried manually removing files, and still when I try apt --reinstall install python, Nothing gets overwritten and the python executable still gives the new 2.7.16 version...   Any idea how to get the official repository version back??
49363
I have Ubuntu 15.10 installed. I have also installed LAMP using the . I then proceeded to set up Moodle via the web page installation. I hit a road block when I got  Moodle requires the json PHP extension.  Please install or enable the json extension.   With the link above, I have tried installing, whilst LAMP was still installed, only PHP5 (libapache2-mod-php5) -- and of course restarting the apache2 service. The problem is in the the /etc/php5/mods-available folder, no json.ini file appears. When I type in terminal sudo php5 -m, json is not a module running. However if I attempt to remove PHP5, it shows before I confirm the removal that the package php5-json will go.   The question I have is how do I get the json extension if I don't have it already, or if I do have it (and it's placed somewhere else) how do I enable it?  EDIT: output of apt-cache policy php5-json  php5-json:   Installed: 1.3.7-1   Candidate: 1.3.7-1   Version table:  *** 1.3.7-1 0         500 http://nz.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages         100 /var/lib/dpkg/status   Tried sudo apt-get install --reinstall php5-json but still missing file.
29467
I'm new to Ubuntu, it looks like it is better than Windows. Last day I tried to install Kget (the download manager) but during the process my computer suddenly stopped working. So I had to switch it off. After I logged into Ubuntu again I can't install any program. The Ubuntu Software Center says:  Items cannot be installed or removed until package catalog is repaired. Do you want to repair it now?   After I clicked repair it says (after few seconds):  Package operation fails - The installation or removal of a software package failed   I've tried several times, but the same problem occurred. Can anyone tell me a solution for this problem?