Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmysqlclient-dev is not installed? #158

Closed
agjohnson opened this issue Jan 13, 2021 · 6 comments · Fixed by #166
Closed

libmysqlclient-dev is not installed? #158

agjohnson opened this issue Jan 13, 2021 · 6 comments · Fixed by #166

Comments

@agjohnson
Copy link
Contributor

agjohnson commented Jan 13, 2021

I am not quite sure what to make of this one yet, but it looks like even though our Dockerfile installs libmysqlclient-dev, it's not actually installed:

# dpkg -l | grep mysql
ii  libmysqlclient20:amd64             5.7.31-0ubuntu0.18.04.1             amd64        MySQL database client library
ii  mysql-common                       5.8+1.0.4                           all          MySQL database common files, e.g. /etc/mysql/my.cnf
# which mysql_config	
# mysql_config
/bin/sh: 5: mysql_config: not found

libmysqlclient-dev is the package that installs mysql_config

This is using this image:

readthedocs/build   6.0                 a48a32b77a74        2 months ago        7.13GB
readthedocs/build   6.0rc1              a48a32b77a74        2 months ago        7.13GB
readthedocs/build   latest              a48a32b77a74        2 months ago        7.13GB

Front logo Front conversations

@agjohnson
Copy link
Contributor Author

Found the cause in docker hub:

...
 ---> 0cd5fed7092b
Step 35/57 : RUN apt-get -y install nodejs npm && npm install --global jsdoc typedoc
---> Running in eb50013d51f9
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
libmysqlclient20 mysql-common
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
gyp libc-ares2 libhttp-parser2.7.1 libjs-async libjs-inherits
libjs-node-uuid libjs-underscore libssl1.0-dev libuv1 libuv1-dev node-abbrev
node-ansi node-ansi-color-table node-archy node-async node-balanced-match
node-block-stream node-brace-expansion node-builtin-modules
node-combined-stream node-concat-map node-cookie-jar node-delayed-stream
node-forever-agent node-form-data node-fs.realpath node-fstream
node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs
node-gyp node-hosted-git-info node-inflight node-inherits node-ini
node-is-builtin-module node-isexe node-json-stringify-safe node-lockfile
node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream
node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once
node-osenv node-path-is-absolute node-pseudomap node-qs node-read
node-read-package-json node-request node-retry node-rimraf node-semver
node-sha node-slide node-spdx-correct node-spdx-expression-parse
node-spdx-license-ids node-tar node-tunnel-agent node-underscore
node-validate-npm-package-license node-which node-wrappy node-yallist
nodejs-dev nodejs-doc
Suggested packages:
node-hawk node-aws-sign node-oauth-sign node-http-signature debhelper
The following packages will be REMOVED:
libmysqlclient-dev libssl-dev
...

@agjohnson
Copy link
Contributor Author

agjohnson commented Jan 13, 2021

The underlying bugs are:

libssl-dev is removed, cascading to libmysqlclient-dev, but both removals are problematic.

This might be reason to install node via nodenv

There is also a silly workaround maybe, that avoids dependency collision:
https://askubuntu.com/questions/1125036/installing-nodejs-dev-fails-depending-on-libssl1-0-dev-but-i-have-already-inst

Edit: libssl1.0-dev is a dead end, still get removal on conflicting dependencies

# apt install libssl-dev libmysqlclient-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  file libc-ares2 libexpat1 libhttp-parser2.7.1 libicu60 libmagic-mgc libmagic1
  libnghttp2-14 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib
  libreadline7 libsqlite3-0 libssl1.0.0 libuv1 libuv1-dev mime-support nodejs
  nodejs-doc python python-minimal python2.7 python2.7-minimal readline-common
  xz-utils
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libc-dev-bin libc6 libc6-dev libmysqlclient20 linux-libc-dev manpages
  manpages-dev mysql-common zlib1g-dev
Suggested packages:
  glibc-doc locales libssl-doc man-browser
The following packages will be REMOVED:
  libssl1.0-dev nodejs-dev
The following NEW packages will be installed:
  libc-dev-bin libc6-dev libmysqlclient-dev libmysqlclient20 libssl-dev
  linux-libc-dev manpages manpages-dev mysql-common zlib1g-dev
The following packages will be upgraded:
  libc6
1 upgraded, 10 newly installed, 2 to remove and 33 not upgraded.
Need to get 13.4 MB of archives.
After this operation, 40.4 MB of additional disk space will be used.

@FrancescoCasalegno
Copy link

I opened an issue on the RTD's GitHub page, readthedocs/readthedocs.org#7990.
What I don't understand is—locally this image seems to have mysql_config, but the RTD builds seem unable to find it?

@humitos
Copy link
Member

humitos commented Mar 18, 2021

Hi @FrancescoCasalegno! We pin the Docker images we download in our servers, we don't use readthedocs/build:latest. I suggest you to try using build.image: testing in your config file that it may not have this problem.

@humitos
Copy link
Member

humitos commented Jul 20, 2021

This apt-get incompatible packages are affecting libssl-dev as well and building Python 3.10 in #174.

Currently, we are using OpenSSL 1.0.2n in all our images:

docs@03d3253830d2:~$ python2 --version ; python2 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Python 2.7.18
OpenSSL 1.0.2n  7 Dec 2017
docs@03d3253830d2:~$ python3.6 --version ; python3.6 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Python 3.6.12
OpenSSL 1.0.2n  7 Dec 2017
docs@03d3253830d2:~$ python3.7 --version ; python3.7 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Python 3.7.9
OpenSSL 1.0.2n  7 Dec 2017
docs@03d3253830d2:~$ python3.8 --version ; python3.8 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Python 3.8.6
OpenSSL 1.0.2n  7 Dec 2017
docs@03d3253830d2:~$ python3.9 --version ; python3.9 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Python 3.9.1
OpenSSL 1.0.2n  7 Dec 2017

@humitos
Copy link
Member

humitos commented Sep 2, 2021

This won't be a problem anymore in #166 because we are not installing nodejs/npm that were conflicting with other packages. Besides, that PR adds a test that checks apt-get is not removing any package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants