I recently purged MySQL but now I am unable to reinstall it using:
sudo apt-get install mysql-server
I get the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.2
E: Package 'mysql-server' has no installation candidate
Although there are many such questions on the internet, none of them are working. I am desperate here please help.
I am using UBUNTU 17.10 x64
If it is urgent, try restoring from your backup.
Related
A have a problem.
I need the php8.1 and I intalled. But, a try install extensions how: gd with command: sudo apt install php8.1-gd and have a problem:
enter image description here
Translate:
Reading package lists... Done
Building dependency tree... Done
Reading status information... Done
Some packages cannot be installed. This could mean that
you request an impossible situation or if you are using the
unstable distribution where some requested packages have not yet been
created or moved from Incoming.
The following information may help resolve a situation:
The following packages have unsatisfied dependencies:
libgd3 : Depends: libavif9 (>= 0.8.4) but not installable
E: Unable to fix issues, you have broken acceptable (hold) packages.
I try upgrade, update but I don't find a solution. What happens? Has a support for this?
enter image description here
Thanks
I'd try upgrade and update in my system expecting the libs were corretly, but, until this time I don't find a solution.
Before the question, I am running on Ubuntu 16.04. Upgrading is not an immediate option. I have installed php5.6 following the instructions in this article:
https://www.liquidweb.com/kb/install-multiple-php-versions-on-ubuntu-16-04/
Following those steps has worked in that phpinfo() shows 5.6, but when using phpmyadmin I get this error:
The mbstring extension is missing. Please check your PHP configuration.
After trying to install the package by itself
apt-get install php5.6-mbstring
I get this error:
E: Unable to locate package php5.6-mbstring
E: Couldn't find any package by glob 'php5.6-mbstring'
E: Couldn't find any package by regex 'php5.6-mbstring'
I have seen a lot of solutions, but none seem to fix this issue or are current.
Any help would be appreciated, or if this is something that can no longer be done that would good to know as well. Thanks!
I am trying to install some PHP packages that I use for my application in Alpine Linux. The packages that I am currently using come from the Remi repo and I install them successfully on CentOS 7, but when I try to install tthe same packages on Alpine, it says not found. An example of a package is php-cli.
Am I doing it right or is there a recommended way of installing packages in Alpine? I am using php7 and Alpine 3.8.
Note: I am using php7- prefix when I am installing a package in Alpine.
Thanks in advance.
For locating packages for Alpine Linux, the Alpine package search engine is the best place to look for.
Querying for php7*, we can see that there are indeed no matches on the main Alpine V3.8 repository, but many matches on the community repository: php7* package search.
For installing these packages, you'll first need to add the community repository to your /etc/apk/repositories file (uncomment it, if it is commented out):
http://dl-cdn.alpinelinux.org/alpine/v3.8/community
Then, run apk update and apk add php7 [additional packages...] for installing the desired PHP 7 packages.
Specifically, php7-cli seems to be missing. For PHP 7 CLI tools, you could try installing php7-dev from the edge community repository. Similar to above, add the following to your /etc/apk/repositories, then update and install:
http://dl-cdn.alpinelinux.org/alpine/edge/community
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:
apache2 : Depends: apache2-bin (= 2.4.27-2ubuntu3) but 2.4.27-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Thanks in Advance
Maybe you should take a look at this article:
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages
thomasrutter: "That particular error message may indicate that you have held packages, but it may also indicate a different problem."
He basically says to do some trouble shooting with some of these commands:
You are able to get a list of held packages with the following command
dpkg --get-selections | grep hold
If none show up or none of them seem related to you it might be something else.
Also have you tried aptitude instead of apt-get to install the package?
I personally think that is a great place to start
sudo aptitude install <apache2 or whatever package you're trying to install>
And last but not least:
sudo aptitude -f install <packagename>
I myself struggled with apache for a while on ubuntu, I believe Thomas Rutter explained it a lot better so again I suggest you take a look at his answer on ask ubuntu
I hope this helped.
Run the following command and your problem will be solved.
apt-get purge apache2-bin
Server has debian wheezy os installed. Php version is php5.3:
user#example:~# php -v
PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16)
I try to install imap extension via apt-get and the result is:
user#example:~# apt-get install php5-imap=5.3.3-7+squeeze17
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '5.3.3-7+squeeze17' for 'php5-imap' was not found
When I try another version I get:
user#example:~# apt-get install php5-imap=5.3.3-7+squeeze19
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-imap : Depends: php5-common (= 5.3.3-7+squeeze19) but 5.3.3-7+squeeze17 is to be installed
E: Unable to correct problems, you have held broken packages.
Does anybody know the safest way to install php5-imap in this case?
P.S. Update to 5.4 from wheezy repo is not solution :(
I solved the issue with calling external python script, which uses imaplib (http://pymotw.com/2/imaplib/).
Example of calling python from php:
<? exec("python <ABSOLUTE_PATH_TO_SCRIPT>.py " . escapeshellarg($arg1));