emcdowell
Posts: 1
Joined: Tue Aug 22, 2017 2:39 am

STICKY: libmysqlclient18 has no installation candidate

Tue Aug 22, 2017 2:43 am

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.

rost
Posts: 1
Joined: Tue Aug 22, 2017 9:48 am

Re: libmysqlclient18 has no installation candidate

Tue Aug 22, 2017 9:52 am

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.

User avatar
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

Tue Aug 22, 2017 9:52 am

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
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.

wnodvik
Posts: 1
Joined: Tue Aug 22, 2017 2:51 pm

Re: libmysqlclient18 has no installation candidate

Tue Aug 22, 2017 2:58 pm

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?

User avatar
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

Wed Aug 23, 2017 1:35 am

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.

ttbinda
Posts: 2
Joined: Thu Aug 24, 2017 9:44 am

Re: libmysqlclient18 has no installation candidate

Thu Aug 24, 2017 9:48 am

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

ttbinda
Posts: 2
Joined: Thu Aug 24, 2017 9:44 am

Re: libmysqlclient18 has no installation candidate

Thu Aug 24, 2017 9:54 am

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

rbain13
Posts: 2
Joined: Sun Aug 27, 2017 5:38 am

Re: libmysqlclient18 has no installation candidate

Sun Aug 27, 2017 5:39 am

Just created an account to say that the post above by ttbinda fixed my problems!

Cheers indeed ^_^

RonR
Posts: 3238
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: libmysqlclient18 has no installation candidate

Tue Aug 29, 2017 8:37 pm

ttbinda wrote:
Thu Aug 24, 2017 9:54 am
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package
Is there some reason you chose the Wheezy version of libmysqlclient18 instead of the Jessie version for use with Stretch?

bmelum
Posts: 7
Joined: Tue Jul 21, 2015 6:53 pm

Re: libmysqlclient18 has no installation candidate

Thu Aug 31, 2017 4:19 pm

ttbinda wrote:
Thu Aug 24, 2017 9:54 am
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
This solves my problem!
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!

User avatar
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

Thu Aug 31, 2017 5:13 pm

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
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.

Sockbat
Posts: 1
Joined: Fri Sep 15, 2017 12:10 pm

Re: libmysqlclient18 has no installation candidate

Fri Sep 15, 2017 12:16 pm

ttbinda wrote:
Thu Aug 24, 2017 9:54 am
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package
Thanks for that!

sleepdeficit
Posts: 1
Joined: Fri Sep 22, 2017 3:51 pm
Location: USA

Re: libmysqlclient18 has no installation candidate

Fri Sep 22, 2017 4:03 pm

This worked for me:

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

zweefvlieg
Posts: 2
Joined: Fri Oct 13, 2017 11:09 am

Re: libmysqlclient18 has no installation candidate

Tue Oct 17, 2017 7:18 pm

Thank you Dougie, now it works! :D

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 15056
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: STICKY: libmysqlclient18 has no installation candidate

Wed Oct 18, 2017 9:57 am

I asked around, and this is what ShiftPlusOne replied:
ShiftPlusOne wrote:
Tue Oct 17, 2017 11:06 pm
It'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.

User avatar
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

Wed Oct 18, 2017 11:32 am

mahjongg wrote:
Wed Oct 18, 2017 9:57 am
I asked around, and this is what ShiftPlusOne replied:
ShiftPlusOne wrote:
Tue Oct 17, 2017 11:06 pm
It'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.
That's wrong.

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.

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6452
Joined: Fri Jul 29, 2011 5:36 pm

Re: STICKY: libmysqlclient18 has no installation candidate

Wed Oct 18, 2017 12:26 pm

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.

User avatar
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

Wed Oct 18, 2017 4:54 pm

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.
ShiftPlusOne wrote:
Wed Oct 18, 2017 12:26 pm
Which part of my reply is wrong?
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.

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6452
Joined: Fri Jul 29, 2011 5:36 pm

Re: STICKY: libmysqlclient18 has no installation candidate

Wed Oct 18, 2017 6:27 pm

Thanks, I'm somewhat sceptical, but I'll take a closer look in the morning.

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6452
Joined: Fri Jul 29, 2011 5:36 pm

Re: STICKY: libmysqlclient18 has no installation candidate

Thu Oct 19, 2017 6:40 am

Looks like the problem is here:

Code: Select all

sudo apt-get install mysql-server php5-mysql -y
It should be:

Code: Select all

sudo apt-get install default-mysql-server php7.0-mysql -y
php5 should not have been included in stretch.

There might be other problems. Will let you know once wordpress is set up.

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6452
Joined: Fri Jul 29, 2011 5:36 pm

Re: STICKY: libmysqlclient18 has no installation candidate

Thu Oct 19, 2017 6:57 am

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.

User avatar
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

Thu Oct 19, 2017 7:49 am

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.

User avatar
ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6452
Joined: Fri Jul 29, 2011 5:36 pm

Re: STICKY: libmysqlclient18 has no installation candidate

Thu Oct 19, 2017 8:17 am

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

User avatar
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

Thu Oct 19, 2017 9:14 am

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.

User avatar
NickT
Posts: 287
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: STICKY: libmysqlclient18 has no installation candidate

Fri Oct 20, 2017 10:33 am

DougieLawson wrote:
Thu Oct 19, 2017 9:14 am
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.
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.

Return to “Troubleshooting”