jetsom compile
This commit is contained in:
@@ -225,14 +225,29 @@ run_privileged() {
|
||||
}
|
||||
|
||||
ensure_system_dependencies() {
|
||||
if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists libusb-1.0; then
|
||||
# Qt >= 6.5 xcb platform plugin needs libxcb-cursor0; aarch64/Jetson images
|
||||
# (and some minimal desktops) ship without it, and the GUI then dies at
|
||||
# startup with "could not load the Qt platform plugin xcb". apt-only: other
|
||||
# distros/managers name these differently and usually have them preinstalled.
|
||||
local qt_gui_packages_missing=0
|
||||
if command -v apt-get >/dev/null 2>&1 && command -v dpkg-query >/dev/null 2>&1; then
|
||||
local package
|
||||
for package in libxcb-cursor0 libxkbcommon-x11-0; do
|
||||
if ! dpkg-query -W -f='${Status}' "${package}" 2>/dev/null | grep -q "install ok installed"; then
|
||||
qt_gui_packages_missing=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists libusb-1.0 \
|
||||
&& ((qt_gui_packages_missing == 0)); then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "[start.sh] Installing system dependency: libusb-1.0 dev headers..."
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
run_privileged apt-get update
|
||||
run_privileged apt-get install -y pkg-config libusb-1.0-0-dev
|
||||
run_privileged apt-get install -y pkg-config libusb-1.0-0-dev libxcb-cursor0 libxkbcommon-x11-0
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
run_privileged dnf install -y pkgconf-pkg-config libusb1-devel
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user