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

Error resolving libs of mariadb and amazon linux 2023 #629

Closed
matejsp opened this issue Jun 29, 2023 · 1 comment · Fixed by #631
Closed

Error resolving libs of mariadb and amazon linux 2023 #629

matejsp opened this issue Jun 29, 2023 · 1 comment · Fixed by #631

Comments

@matejsp
Copy link

matejsp commented Jun 29, 2023

Describe the bug

It does not work by default.
It works if I copy pc file like this:
cp /usr/lib64/pkgconfig/libmariadb.pc /usr/lib64/pkgconfig/mysqlclient.pc


  Complete output (22 lines):

  Trying pkg-config --exists mysqlclient

  Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.

  Trying pkg-config --exists mariadb

  Command 'pkg-config --exists mariadb' returned non-zero exit status 1.

  Traceback (most recent call last):

    File "/source/python39/lib64/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>

      main()

    File "/source/python39/lib64/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main

      json_out['return_val'] = hook(**hook_input['kwargs'])

    File "/source/python39/lib64/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel

      return hook(config_settings)

    File "/tmp/pip-build-env-n_jk1cp6/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel

      return self._get_build_requires(config_settings, requirements=['wheel'])

    File "/tmp/pip-build-env-n_jk1cp6/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires

      self.run_setup()

    File "/tmp/pip-build-env-n_jk1cp6/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in run_setup

      exec(code, locals())

    File "<string>", line 154, in <module>

    File "<string>", line 48, in get_config_posix

    File "<string>", line 27, in find_package_name

  Exception: Can not find valid pkg-config name.

  Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually

Environment

Amazon Linux 2023

How did you install libmysqlclient libraries?

dnf install -y mariadb-connector-c-devel pkgconfig

What version of mysqlclient do you use?

No response

Docker command to start MySQL server

No response

Minimum but complete code to reproduce

# Write Python code here.
import MySQLdb

conn = MySQLdb.connect(host='127.0.0.1', port=3306, user='root')
...

Schema and initial data required to reproduce.

-- Write SQL here.
-- e.g. CREATE TABLE ...

Commands, and any other step required to reproduce your issue.

No response

@matejsp matejsp changed the title Error resolving libs of mariadb and mysql Error resolving libs of mariadb and amazon linux 2023 Jun 29, 2023
@methane
Copy link
Member

methane commented Jun 29, 2023

OK. I will add libmariadb to default pkg-config name list.

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.

2 participants