jneilliii / OctoPrint-BGCode

9 stars 2 forks source link

Can't install libssl.so.3 error #14

Open aharbick opened 3 weeks ago

aharbick commented 3 weeks ago

I've tried to install this plugin and it fails (I believe) because pip can't find libssl.so.3. Any suggestions?

Installing plugin "BGCode" from https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip...
/home/pi/oprint/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmpfi41ngx3/OctoPrint-BGCode-master.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /tmp/tmpfi41ngx3/OctoPrint-BGCode-master.zip
Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python3.7/site-packages (from BGCode==0.2.0) (1.10.1)
Collecting pybgcode@ https://github.com/jneilliii/libbgcode/archive/refs/tags/0.2.0.zip
Downloading https://github.com/jneilliii/libbgcode/archive/refs/tags/0.2.0.zip
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/pi/oprint/bin/python3 /home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp1eumbo3z
cwd: /tmp/pip-install-cswno0jg/pybgcode_cf7c868621324c1b90aaddf56217e741
Complete output (34 lines):
/tmp/pip-build-env-_nibmco4/normal/lib/python3.7/site-packages/cmake/data/bin/cmake: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'py_build_cmake.build' has no attribute 'prepare_metadata_for_build_wheel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 131, in prepare_metadata_for_build_wheel
config_settings)
File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/build.py", line 68, in build_wheel
config_settings)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/build.py", line 248, in build_wheel_in_dir
self.do_native_cross_cmake_build(paths, cfg, pkg_info)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/build.py", line 334, in do_native_cross_cmake_build
cfg.cross, package_info, native_install_dir)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/build.py", line 510, in run_cmake
cmaker.configure()
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/cmake.py", line 154, in configure
self.run(cmd, cwd=cwd, check=True, env=env)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/cmake.py", line 68, in run
return self.runner.run(*args, **kwargs)
File "/tmp/pip-build-env-_nibmco4/overlay/lib/python3.7/site-packages/py_build_cmake/cmd_runner.py", line 25, in run
return sp_run(*args, **kwargs)
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '-S', '/tmp/pip-install-cswno0jg/pybgcode_cf7c868621324c1b90aaddf56217e741/pybgcode', '-B', '/tmp/pip-install-cswno0jg/pybgcode_cf7c868621324c1b90aaddf56217e741/.py-build-cmake_cache/cp37-cp37m-linux_armv7l', '-D', 'PY_BUILD_CMAKE_PACKAGE_VERSION:STRING=0.2.0', '-D', 'PY_BUILD_CMAKE_PACKAGE_NAME:STRING=pybgcode', '-D', 'PY_BUILD_CMAKE_MODULE_NAME:STRING=pybgcode', '-D', 'Python3_EXECUTABLE:FILEPATH=/home/pi/oprint/bin/python3', '-D', 'Python3_ROOT_DIR:PATH=/home/pi/oprint', '-D', 'Python3_FIND_REGISTRY=NEVER', '-D', 'Python3_FIND_STRATEGY=LOCATION', '-D', 'PyBGCode_LINK_SYSTEM_LIBBGCODE=off', '-D', 'CMAKE_BUILD_TYPE:STRING=Release']' returned non-zero exit status 127.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pi/oprint/bin/python3 /home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp1eumbo3z Check the logs for full command output.
Looks like the plugin was already installed. Forcing a reinstall.
/home/pi/oprint/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmpfi41ngx3/OctoPrint-BGCode-master.zip --no-cache-dir --ignore-installed --force-reinstall --no-deps
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /tmp/tmpfi41ngx3/OctoPrint-BGCode-master.zip
Building wheels for collected packages: BGCode
Building wheel for BGCode (setup.py): started
Building wheel for BGCode (setup.py): finished with status 'done'
Created wheel for BGCode: filename=BGCode-0.2.0-py2.py3-none-any.whl size=4225 sha256=405d3c8e93b19e4ca2b5b734425989c4f71fe25d3a720774e984e9b9d051d18e
Stored in directory: /tmp/pip-ephem-wheel-cache-5y_b39zt/wheels/78/99/85/21aa7fd9a24221009eeb1fca69fd2529b60c11bb1d0bbbba1e
Successfully built BGCode
Installing collected packages: BGCode
Successfully installed BGCode-0.2.0
Done!
jneilliii commented 3 weeks ago

try this in SSH session of your pi.

https://askubuntu.com/questions/339364/libssl-so-10-cannot-open-shared-object-file-no-such-file-or-directory

aharbick commented 3 weeks ago

🤔 in not clear what you’re suggesting…. That I link a version 1.0 of the libssl lib to libssl.so.3? The problem in the linked post was that some code was incorrectly linking against libssl.so.10 but that it was actually the same version/dependency.

I think my case is a version mismatch for some reason…

jneilliii commented 3 weeks ago

I meant, just make sure it's installed.

sudo apt-get update
sudo apt-get install libssl libssl-dev
aharbick commented 3 weeks ago

Yeah. I ran that and it is installed. But it still can’t find libssl.so.3. I forced symlinks to that (as well as libcrypto.so.3) and then it fails trying to find OpenSSL 3.0 symbols. I think something has a dependency on a newer version of OpenSSL. 🤷‍♂️

jneilliii commented 3 weeks ago

yeah, the compiling side of libgcode is beyond me and prusa doesn't really give any good insight from their repo here for that module/library.

aharbick commented 3 weeks ago

Well thanks for looking anyhow! I build openssl3 from scratch with this https://hostnextra.com/learn/tutorials/how-to-install-openssl-3-on-ubuntu

and then I get a different linker error with libstdc++6

I’ll keep digging and see if I can figure something out and report back.

badhex commented 2 weeks ago

What fixed my octopi was ssh'ing into my pi and executing: