-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
The library libcrypto could not be found #68
Comments
I'm having a similar issue on Linux Debian Sid. I made sure the python3-oscryto package was installed. Unlike freekvh, who's getting a "The library libcrypto could not be found" error, I'm getting the error "Error detecting the version of libcrypto". Here's the complete error stack:
|
I just realised now that there's a bugfix version downloadable from the mobileread forum: https://www.mobileread.com/forums/showpost.php?p=4157570&postcount=2 |
@freekvh I had the exact same issue, also on NixOS! I'm using an override to tell the custom pkgs.calibre.overrideAttrs (attrs: {
preFixup = (
builtins.replaceStrings
[
''
--prefix PYTHONPATH : $PYTHONPATH \
''
]
[
''
--prefix LD_LIBRARY_PATH : ${pkgs.libressl.out}/lib \
--prefix PYTHONPATH : $PYTHONPATH \
''
]
attrs.preFixup
);
}) I had to use WARNING: This will build |
Yeah, I should really get around to releasing 0.1.0 with all this fixed. The latest beta version here on Github ( https://github.com/Leseratte10/acsm-calibre-plugin/suites/15775400817/artifacts/900357147 ) also has this bugfix included so that one should work as well. This is the same bug as in #67. All that needs to be done is download the latest alpha version from the Github Actions page which contains a fixed oscrypto version. |
Hi @Leseratte10 , I'm also facing this issue. Best regards and thank you very much for all your efforts |
The link is working fine, but only for users logged in on Github - sadly Github doesn't allow making these links public. |
Using Calibre 6.29. If I use fixed plugin from here [https://www.mobileread.com/forums/showpost.php?p=4157570&postcount=2], I get this error: calibre 6.29 embedded-python: True During handling of the above exception, another exception occurred: Traceback (most recent call last): If I use this link: [ https://github.com/Leseratte10/acsm-calibre-plugin/suites/15775400817/artifacts/900357147 I get a download calibre-plugins.zip with same error loading as above |
calibre-migration.plugin.zip causes: calibre, version 6.29.0 calibre 6.29 embedded-python: True During handling of the above exception, another exception occurred: Traceback (most recent call last): calibre-plugin.zip causes: calibre 6.29 embedded-python: True During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Thank you for your help! |
Just a note that I worked around both it not being found and the version issue by editing the the libcrypto_ctypes.py file in the directory calibre had unpacked the plugin. Changed
to
as just regular loading locates this fine (memory says that I saw this was already loaded at runtime, but I am unable to duplicate that now, however, it still loads fine). And further down there was a
which obviously needs |
Interesting, thanks for that patch. I don't know that much about library loading so I can't comment on the 1st change too much (I will need to look into that), but the 2nd change is something that I did for Linux as well a while ago (after openssl 3.0.10 came out) so I'll add that patch for the Mac library as well. |
No problem. I did it again just now and updated the comment to have the correct library loading line ( Had read through the code, and the commented code is ultimately using the
Anyway, figured it made much more sense to just try and load it and let the system do its standard library loading location searching. Only item is that you do need the major version number. Wouldn't be hard to loop down trying versions from 3, or even 4 or 5, though. |
I ran into the same problem (also on nixos), and the fixed version from github actions has timed out and is no longer available even when logged in. So here was my quick and dirty approach to getting a working install:
This gets a working plugin zip, but it also needs a bit of fiddling to properly find libcrypto.
and now it works, and I've successfully activated it with an anonymous ADE account. |
The link is definitely dead now. New link? |
I've updated the included oscrypto version again, maybe that already fixes some of the issues. Before I add the CDLL code patch by @twhitehead (if it's still needed with the new version) I need to test that some more to make sure it doesn't break any OS and/or older Calibre versions. In case the link expires again I've also attached the current build of the plugin (64aaca3) here: calibre-plugin.zip |
Now working on Debian Bookworm. |
Just a bump to encourage making a release - I love the fact that I no longer need to maintain Wine only to run ADE to download library books! |
@Leseratte10 thanks for all the work you've put into this! I tried installing the attached build from your comment above and got the error message below. Please advise?
|
@NathanFuller I had the same issue and have been able to fix it by going to ~/.config/calibre/plugins and deleting the ACSMInput folder. This removes the remnants of deACSM, and when you try installing again it should just work. |
Hey, I opened a PR that will allow overriding the libssl and libcrypto locations. If this PR goes through, anyone on NixOS can use this snippet:
(pkgs.calibre.overrideAttrs (old: {
postInstall = ''
wrapProgram $out/bin/calibre \
--set-default ACSM_LIBCRYPTO ${pkgs.openssl.out}/lib/libcrypto.so \
--set-default ACSM_LIBSSL ${pkgs.openssl.out}/lib/libssl.so
'';
})) |
I am facing these similar issues on a Mac, too. The link above doesn't seem to lead to any build I can download. It looks like a Calibre plugin isn't simply a zip archive of the code as I've run into multiple issues. Can someone point me in the right direction as to how to make the master branch (or whichever branch) into a proper Calibre package? FWIW, here's my trace. This repeats multiple times.
|
You should be able to get a zip by running bundle-calibre-plugin.sh |
I'm experiencing the same error stack, and this workaround didn't work for me. It just returns the same error whether or not there is the DeACSM folder. |
Bug description
calibre, version 6.17.0
ERROR: Install plugin failed: A problem occurred while installing this plugin. This plugin will now be uninstalled. Please post the error message in details below into the forum thread for this plugin and restart calibre.
Traceback (most recent call last):
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.init", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.17.0_tmp_i3rbcmnq/lrk5x84g.zip/libadobe.py", line 59, in
from oscrypto import keys
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in
from .util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in
from ._openssl.util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in
from ._libcrypto_ctypes import (
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 28, in
raise LibraryNotFoundError('The library libcrypto could not be found')
oscrypto.errors.LibraryNotFoundError: The library libcrypto could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/gui2/dialogs/plugin_updater.py", line 729, in install_clicked
plugin = add_plugin(zip_path)
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/customize/ui.py", line 520, in add_plugin
plugin = initialize_plugin(plugin, path_to_zip_file, PluginInstallationType.EXTERNAL)
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/customize/ui.py", line 715, in initialize_plugin
raise InvalidPlugin((('Initialization of plugin %s failed with traceback:')
calibre.customize.InvalidPlugin: Initialization of plugin Traceback (most recent call last):
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.init", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.17.0_tmp_i3rbcmnq/lrk5x84g.zip/libadobe.py", line 59, in
from oscrypto import keys
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in
from .util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in
from ._openssl.util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in
from ._libcrypto_ctypes import (
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 28, in
raise LibraryNotFoundError('The library libcrypto could not be found')
oscrypto.errors.LibraryNotFoundError: The library libcrypto could not be found
failed with traceback:
Traceback (most recent call last):
File "/nix/store/jcwka24y0k09y494zh20achv414fi0l3-calibre-6.17.0/lib/calibre/calibre/customize/ui.py", line 710, in initialize_plugin
p.initialize()
File "calibre_plugins.deacsm.init", line 226, in initialize
from libadobe import createDeviceKeyFile, update_account_path, sendHTTPRequest
File "/tmp/calibre_6.17.0_tmp_i3rbcmnq/lrk5x84g.zip/libadobe.py", line 59, in
from oscrypto import keys
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/keys.py", line 5, in
from ._asymmetric import parse_certificate, parse_private, parse_public
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_asymmetric.py", line 27, in
from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/kdf.py", line 9, in
from .util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/util.py", line 14, in
from ._openssl.util import rand_bytes
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/util.py", line 6, in
from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto.py", line 24, in
from ._libcrypto_ctypes import (
File "/home/myname/.config/calibre/plugins/DeACSM/modules/oscrypto/oscrypto/_openssl/_libcrypto_ctypes.py", line 28, in
raise LibraryNotFoundError('The library libcrypto could not be found')
oscrypto.errors.LibraryNotFoundError: The library libcrypto could not be found
Operating system
Linux
Which version of Calibre are you running?
6.17.0
Which version of the ACSM Input plugin are you running?
0.0.16
Import type
No response
Further information
I'm on NixOS, I tried installing OpenSSL, but it seems deprecated. Not sure what else to try. For the record, I bought a book, site says it's an epub but it turns out to be some URLLINK.acsm file. Came here to find a solution to read my book :)
The text was updated successfully, but these errors were encountered: