I am trying to follow the guide for setting up a LAMP server however I cannot install php5-mysql.
I get the error that it cannot install libmysql client18 and when I try to install that I get the error "E: Package 'libmysqlclient18' has no installation candidate"
I have tried sudo apt-get update, sudo apt-get upgrade, and sudo apt-get dist-upgrade and none of them have made any difference.
I have tried a fresh install, as well as restarting and it still won't work.
I have successfully installed apache2, php5, and mysql-server, along with the other packages mentioned in the getting started guide.
I am working off a raspberry pi 2 model B if that makes a difference.
How do I get php5-mysql to work? Thank you.
Re: libmysqlclient18 has no installation candidate
I have the same problem. What's interesting is that I installed LAMP on virtual machine without problems. When I try to do it from my new RPi3, this problem occurs. I bought it for our small company to be our local web server but I am running in circles for two days already with zero success.
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: libmysqlclient18 has no installation candidate
Try installing these pieces
libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1
libmariadbclient18 mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: libmysqlclient18 has no installation candidate
Hi, new person, same problem.
I tried installing the mariadb packages as suggested, however I still cannot install libmysqlclient18. E: Package 'libmysqlclient18' has no installation candidate
Is there any sort of insight to that error you could provide?
I tried installing the mariadb packages as suggested, however I still cannot install libmysqlclient18. E: Package 'libmysqlclient18' has no installation candidate
Is there any sort of insight to that error you could provide?
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: libmysqlclient18 has no installation candidate
It'll be next week before I have a 2017-08-16 Stretch system running, typically, they released it while I'm 4000 miles away from any of my Raspberries.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: libmysqlclient18 has no installation candidate
Hi
I confirm the bug. Installing mariadb* packages is useless: they are already installed.
There are not any libmysqlclient* (18 is the reuqest) candidate.
I'll try to install it manually, however.
I'm running a fresh 2017-08-16-raspbian-stretch-lite distro. Update is useless.
Thank you
I confirm the bug. Installing mariadb* packages is useless: they are already installed.
There are not any libmysqlclient* (18 is the reuqest) candidate.
I'll try to install it manually, however.
I'm running a fresh 2017-08-16-raspbian-stretch-lite distro. Update is useless.
Thank you
Re: libmysqlclient18 has no installation candidate
Solved!
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package
then install it via
sudo dpkg --install libmysqlclient18
and then reinstall php5-mysql via apt-get
apt-get install php5-mysql
now misqli is installed
cheers
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package
then install it via
sudo dpkg --install libmysqlclient18
and then reinstall php5-mysql via apt-get
apt-get install php5-mysql
now misqli is installed
cheers
Re: libmysqlclient18 has no installation candidate
Just created an account to say that the post above by ttbinda fixed my problems!
Cheers indeed ^_^
Cheers indeed ^_^
Re: libmysqlclient18 has no installation candidate
Is there some reason you chose the Wheezy version of libmysqlclient18 instead of the Jessie version for use with Stretch?ttbinda wrote: ↑Thu Aug 24, 2017 9:54 amDownload from here https://packages.debian.org/wheezy/armh ... 8/download the package
Re: libmysqlclient18 has no installation candidate
This solves my problem!ttbinda wrote: ↑Thu Aug 24, 2017 9:54 amSolved!
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package
then install it via
sudo dpkg --install libmysqlclient18
and then reinstall php5-mysql via apt-get
apt-get install php5-mysql
now misqli is installed
cheers
I have a real beginner question. How do I download the package you have linked? I tried using apt-get but could not figure out what to write after that. I have searched the web but could not find a similar application, even though that is just me not understanding stuff right now.
Cheers!
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: libmysqlclient18 has no installation candidate
Download from http://archive.raspbian.org/raspbian/po ... _armhf.deb
to get the latest Jessie version while we're waiting for the Raspbian folks to fix this error.
Get http://archive.raspbian.org/raspbian/po ... _armhf.deb if you're running MariaDB 10.1 rather than MySQL 5.5
to get the latest Jessie version while we're waiting for the Raspbian folks to fix this error.
Get http://archive.raspbian.org/raspbian/po ... _armhf.deb if you're running MariaDB 10.1 rather than MySQL 5.5
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: libmysqlclient18 has no installation candidate
Thanks for that!ttbinda wrote: ↑Thu Aug 24, 2017 9:54 amDownload from here https://packages.debian.org/wheezy/armh ... 8/download the package
-
- Posts: 1
- Joined: Fri Sep 22, 2017 3:51 pm
- Location: USA
Re: libmysqlclient18 has no installation candidate
This worked for me:
------------------------------
The last line is spit out was:
After that, I was--for my purposes--successfully able to:
------------------------------
Hope that helps!
- sleepdeficit
Code: Select all
sudo apt-get install mysql-common
The last line is spit out was:
------------------------------Setting up libmysqlclient18:armhf (5.5.57-0+deb7u1) ...
After that, I was--for my purposes--successfully able to:
Code: Select all
sudo apt-get install mysql-server php5-mysql -y
Hope that helps!
- sleepdeficit
https://github.com/sleepdefic1t
-
- Posts: 2
- Joined: Fri Oct 13, 2017 11:09 am
Re: libmysqlclient18 has no installation candidate
Thank you Dougie, now it works! 

- mahjongg
- Forum Moderator
- Posts: 15056
- Joined: Sun Mar 11, 2012 12:19 am
- Location: South Holland, The Netherlands
Re: STICKY: libmysqlclient18 has no installation candidate
I asked around, and this is what ShiftPlusOne replied:
ShiftPlusOne wrote: ↑Tue Oct 17, 2017 11:06 pmIt's nothing to do with Raspbian directly. Debian don't have the package for stretch, so unless something is pulling it in as a dependency, this isn't a problem. The functionality is provided by mariadb instead of mysql. I think people who are trying to install it are following out of date tutorials or using external repos.
https://bugs.debian.org/cgi-bin/bugrepo ... bug=837615
Raspbian has a 'mediatomb' package which depends on mysql, but that's not in Debian. It seems to have been brought forward from Jessie for some reason.
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STICKY: libmysqlclient18 has no installation candidate
That's wrong.mahjongg wrote: ↑Wed Oct 18, 2017 9:57 amI asked around, and this is what ShiftPlusOne replied:ShiftPlusOne wrote: ↑Tue Oct 17, 2017 11:06 pmIt's nothing to do with Raspbian directly. Debian don't have the package for stretch, so unless something is pulling it in as a dependency, this isn't a problem. The functionality is provided by mariadb instead of mysql. I think people who are trying to install it are following out of date tutorials or using external repos.
https://bugs.debian.org/cgi-bin/bugrepo ... bug=837615
Raspbian has a 'mediatomb' package which depends on mysql, but that's not in Debian. It seems to have been brought forward from Jessie for some reason.
Get a fresh SDCard, install Raspbian Stretch on it. Then follow the official Raspberry Pi Foundation docs at: https://projects.raspberrypi.org/en/pro ... -wordpress
That LAMP server won't install without using my recipe viewtopic.php?f=28&t=191380#p1205095
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6452
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STICKY: libmysqlclient18 has no installation candidate
Which part of my reply is wrong?
That seems like a problem with the learning resource rather than with Raspbian. Again, this is a change that was made in debian, and not by us. The instructions should be updated for mariadb. I believe there is a metapackage which installs the appropriate default package.
That seems like a problem with the learning resource rather than with Raspbian. Again, this is a change that was made in debian, and not by us. The instructions should be updated for mariadb. I believe there is a metapackage which installs the appropriate default package.
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STICKY: libmysqlclient18 has no installation candidate
ShiftPlusOne wrote: ↑Tue Oct 17, 2017 11:06 pm... I think people who are trying to install it are following out of date tutorials or using external repos.
It's the "out of date tutorials". Because you can still choose to use MySQL on Stretch. If we swap mysql packages with mariadb packages in those tutorials we'll end up with the equivalent problem.
And
It's the "external repos". Because I can get it to fail on a fresh copy of plain Raspbian Stretch 2017-09-07 using stock standard unmodified /etc/apt files.
It's just plain broken for both MySQL and MariaDB (which I've been running for years because AriaDB is better than InnoDB).
My ugly fix is to pull the latest debs from Jessie, install one of those (for either MariaDB or MySQL) then run away happy. So you must be able do that with Stretch, just make those Jessie debs available as Stretch installation candidates (however that gets done). Then moan at the upstream maintainers because they've broken it.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6452
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STICKY: libmysqlclient18 has no installation candidate
Thanks, I'm somewhat sceptical, but I'll take a closer look in the morning.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6452
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STICKY: libmysqlclient18 has no installation candidate
Looks like the problem is here:
It should be:
php5 should not have been included in stretch.
There might be other problems. Will let you know once wordpress is set up.
Code: Select all
sudo apt-get install mysql-server php5-mysql -y
Code: Select all
sudo apt-get install default-mysql-server php7.0-mysql -y
There might be other problems. Will let you know once wordpress is set up.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6452
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STICKY: libmysqlclient18 has no installation candidate
LAMP stack up and running without libmysqlclient18.
The only other change to that resource should be that in order to log in as root, you have to run mysql as root. I added a new user for wordpress and it all just worked.
The only other change to that resource should be that in order to log in as root, you have to run mysql as root. I added a new user for wordpress and it all just worked.
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STICKY: libmysqlclient18 has no installation candidate
So is it possible to disable php5 with some sort of funky apt/deb/whatever package that means when someone tries to install php5-mysql they get php7.0-mysql instead?
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
- ShiftPlusOne
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6452
- Joined: Fri Jul 29, 2011 5:36 pm
Re: STICKY: libmysqlclient18 has no installation candidate
Yes, but since it's possible that somebody actually wants to run php5 instead with your workaround, that would mess things up for them. I think it's best to find out why uninstallable packages which aren't in Debian are being included in Raspbian.
As far as the learning resource itself goes, there seems to already be an issue open about this.
https://github.com/raspberrypilearning/ ... -337817504
As far as the learning resource itself goes, there seems to already be an issue open about this.
https://github.com/raspberrypilearning/ ... -337817504
- DougieLawson
- Posts: 42644
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: STICKY: libmysqlclient18 has no installation candidate
Thank you. I think we've now got a "sticky" thread that explains how to make php5 work and how to do it properly with php7.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: STICKY: libmysqlclient18 has no installation candidate
I couldn't find the 'sticky' thread, if you know where it is I'd be most grateful for a link. A while ago whilst porting my existing project which used php5 from Jessie to Stretch, I did manage this by installing php7 and there were a few functions missing from my php pages, which I managed to fix by installing some other stuff. I'm ashamed to say that I've completely forgotten what I did, so anything that would be useful for making the notes that I should have made in the first place would be great.DougieLawson wrote: ↑Thu Oct 19, 2017 9:14 amThank you. I think we've now got a "sticky" thread that explains how to make php5 work and how to do it properly with php7.