Reputation: 3764
I am trying to install turbodbc with pip but I am getting the following error
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/determine_parameter_type.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/determine_parameter_type.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/buffer_size.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/buffer_size.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/column_info.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/column_info.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/connect.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/connect.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/connection.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/connection.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/cursor.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/cursor.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/error.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/error.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/module.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/module.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/options.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/options.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/python_parameter_set.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/python_parameter_set.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_bindings/python_result_set.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/python_result_set.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_parameter_set.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_parameter_set.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto -fuse-linker-plugin -ffat-lto-objects -fPIC -Iinclude/ -I/home/ayadav28/.local/lib/python3.7/site-packages/pybind11/include -I/usr/include/python3.7m -c src/turbodbc_python/python_result_set.cpp -o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_result_set.o --std=c++11 -fvisibility=hidden
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-cpython-37/src/turbodbc_python/determine_parameter_type.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/buffer_size.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/column_info.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/connect.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/connection.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/cursor.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/error.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/module.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/options.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/python_parameter_set.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_bindings/python_result_set.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_parameter_set.o build/temp.linux-x86_64-cpython-37/src/turbodbc_python/python_result_set.o -Lbuild/lib.linux-x86_64-3.7 -L/usr/lib -lodbc -lturbodbc.cpython-37m-x86_64-linux-gnu -o build/lib.linux-x86_64-cpython-37/turbodbc_intern.cpython-37m-x86_64-linux-gnu.so -Wl,-rpath,$ORIGIN
/usr/bin/ld: cannot find -lturbodbc.cpython-37m-x86_64-linux-gnu
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> turbodbc
I already installed libboost and other required packages:
sudo apt-get install -y python3-dev default-libmysqlclient-dev build-essential unixodbc-dev libboost-all-dev
but the issue still persists, any idea what I might be missing?
Upvotes: 0
Views: 175
Reputation: 1
Pip is a package installer and manager, and the wheel is a way that pip prefers to install packages because the wheel allows fast and efficient installations and are smaller in comparison to eggs. Hence upgrading wheels might also solve the problem of ‘error: legacy-install-failure.’ The setup tools enhance the over-installation by enhancing the python standard library distribution utilities. Therefore if you update these modules, it might solve your error because this error can also arise if one of these modules is not up-to-date. Let us see how we can upgrade these modules.
python - m pip install – upgrade pip
Then upgrade your wheel by using:
pip install - upgrade wheel
Then finally upgrade the setup tools.
pip install - upgrade setuptools
Now, again try to install the package which was throwing error in the first place.
Upvotes: -2