Closed firewave closed 2 years ago
After wrestling with some random bug for an hour, you can now use nosudo
with install-deps
for this behavior
Thanks a lot for the amazingly fast reply. I will apply the change tomorrow.
Unfortunately the change broke the default behavior because of a copy-and-paste error. :(
Okay that was pretty bad, sorry about that. Should be fixed now.
python3 -m aqt install 5.15.2 linux desktop -m qtcharts -O /__w/cppcheck/Qt
Traceback (most recent call last):
File "/__t/Python/3.9.4/x64/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/__t/Python/3.9.4/x64/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/__t/Python/3.9.4/x64/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/aqt/__init__.py", line 25, in <module>
from aqt.installer import Cli
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/aqt/installer.py", line 37, in <module>
import py7zr
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/py7zr/__init__.py", line 30, in <module>
from py7zr.py7zr import ArchiveInfo, FileInfo, SevenZipFile, is_7zfile, pack_7zarchive, unpack_7zarchive
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/py7zr/py7zr.py", line 40, in <module>
from py7zr.archiveinfo import Folder, Header, SignatureHeader
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/py7zr/archiveinfo.py", line 35, in <module>
from py7zr.compressor import SevenZipCompressor, SevenZipDecompressor
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/py7zr/compressor.py", line 33, in <module>
from Crypto.Cipher import AES
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/Crypto/Cipher/__init__.py", line 27, in <module>
from Crypto.Cipher._mode_ecb import _create_ecb_cipher
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/Crypto/Cipher/_mode_ecb.py", line 35, in <module>
raw_ecb_lib = load_pycryptodome_raw_lib("Crypto.Cipher._raw_ecb", """
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/Crypto/Util/_raw_api.py", line 293, in load_pycryptodome_raw_lib
return load_lib(pycryptodome_filename(dir_comps, filename),
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/Crypto/Util/_raw_api.py", line 95, in load_lib
lib = ffi.dlopen(name)
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/__t/Python/3.9.4/x64/lib/python3.9/site-packages/cffi/api.py", line 817, in _load_backend_lib
import ctypes.util
File "/__t/Python/3.9.4/x64/lib/python3.9/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
Error: The process 'python3' failed with exit code 1
Seems like there is a missing dependency. Not sure where the error is located.
dpkg -S libffi.so.7
libffi7:amd64: /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0
libffi7:amd64: /usr/lib/x86_64-linux-gnu/libffi.so.7
Installing the package manually fixes it.
I would change the ticket name to reflect this is actually about docker support.
apt-get installing libffi-dev
should fix this, yes?
libffi7
is the package in question - as seen in the dpkg
output.
I think it is out of scope for this action to install that, because that package is only for ubuntu 20.04 and 21.04. Maybe try passing setup-python: false
to install-qt-action and install python with the apt command beforehand.
That package probably changed in-between distros. I think the problem stems from the package being installed by pip
instead by the system package python3-cffi
(or whatever it is called) and it being a minimized docker image. I might take a look into it but I am really pressed for time at the moment.
If this is not done within the action it should probably be mentioned somewhere in the documentation that you are required to install that package when using docker or downsized distros.
Well, depending on what the user is doing, there are all sorts of packages that need to be installed, and of course these are all different between distros. Documenting edge cases like this would be an exercise in futility. The only thing that I can guarantee works out of the box is using Github's runners
I didn't expect that the packages are mentioned in detail - just that there might be such cases - to avoid bug reports...hopefully :-)
If you try to use this in an action which will be run inside a container
it will fail since
sudo
is not availablesudo
is not necessary here since it will be executed with a user that has all privileges.