Install CloudCompare in a User Folder on Ubuntu

3 minute read

Published:

CloudCompare is a desktop application for viewing and processing point clouds and meshes. On Linux, the project’s download page directs users to Flathub. If you want the Ubuntu-packaged build in a folder you control, you can download the .deb package and unpack it without registering the application with dpkg.

This guide targets Ubuntu 24.04 on amd64. The Ubuntu repository version can lag behind the latest upstream release. The package still uses shared libraries from Ubuntu, so this is a local application install, not a fully self-contained binary.

Ubuntu publishes the package and its dependency list for Noble amd64. The script uses the package version available from the machine’s configured Ubuntu repositories.

Copy, paste, and run

The script below installs the package’s runtime libraries through APT, downloads the CloudCompare package, extracts its files under ~/Applications/cloudcompare, and adds a launcher to your Ubuntu app grid. It does not install the CloudCompare package system-wide.

Paste the entire block into a terminal:

#!/usr/bin/env bash
set -euo pipefail

if [[ "$(dpkg --print-architecture)" != "amd64" ]]; then
  echo "This script targets Ubuntu 24.04 amd64." >&2
  exit 1
fi

if [[ ! -r /etc/os-release ]]; then
  echo "Cannot identify the operating system." >&2
  exit 1
fi
# shellcheck disable=SC1091
. /etc/os-release
if [[ "${ID:-}" != "ubuntu" || "${VERSION_ID:-}" != "24.04" ]]; then
  echo "This script targets Ubuntu 24.04 amd64." >&2
  exit 1
fi

APP_DIR="${HOME}/Applications/cloudcompare"
DESKTOP_DIR="${HOME}/.local/share/applications"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT

sudo apt-get update
sudo apt-get install -y \
  libavcodec60 \
  libavformat60 \
  libavutil58 \
  libgl1 \
  libglu1-mesa \
  libgomp1 \
  libqt5concurrent5t64 \
  libqt5core5t64 \
  libqt5gui5t64 \
  libqt5opengl5t64 \
  libqt5printsupport5t64 \
  libqt5widgets5t64 \
  libswscale7 \
  zlib1g

(
  cd "$TMP_DIR"
  apt-get download cloudcompare
)

DEB_FILE="$(find "$TMP_DIR" -maxdepth 1 -type f -name 'cloudcompare_*.deb' -print -quit)"
if [[ -z "$DEB_FILE" ]]; then
  echo "APT did not download a CloudCompare package." >&2
  exit 1
fi

mkdir -p "$APP_DIR"
# Replace only the extracted application payload managed by this script.
rm -rf "$APP_DIR/root"
dpkg-deb -x "$DEB_FILE" "$APP_DIR/root"

cat > "$APP_DIR/CloudCompare" <<'LAUNCHER'
#!/bin/sh
APP_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
LIB_DIR="$APP_DIR/root/usr/lib/x86_64-linux-gnu/cloudcompare"
export LD_LIBRARY_PATH="$LIB_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
exec "$APP_DIR/root/usr/bin/CloudCompare" "$@"
LAUNCHER
chmod +x "$APP_DIR/CloudCompare"

mkdir -p "$DESKTOP_DIR"
cat > "$DESKTOP_DIR/cloudcompare-local.desktop" <<DESKTOP
[Desktop Entry]
Type=Application
Name=CloudCompare
Comment=3D point cloud and mesh processing software
Exec="$APP_DIR/CloudCompare" %F
Terminal=false
Categories=Graphics;3DGraphics;Viewer;
Icon=$APP_DIR/root/usr/share/icons/cloudcompare.png
Keywords=3d;point cloud;mesh;viewer;
StartupNotify=true
DESKTOP

if command -v update-desktop-database >/dev/null 2>&1; then
  update-desktop-database "$DESKTOP_DIR"
fi

echo "Installed CloudCompare under: $APP_DIR"
echo "Open CloudCompare from the Ubuntu app grid."

The script asks for your password when it installs the runtime libraries. Downloading and unpacking the application package itself happens as your user.

Open a point cloud

After installation, start CloudCompare from the Ubuntu app grid. You can also launch it from a terminal:

~/Applications/cloudcompare/CloudCompare /path/to/point-cloud.ply

CloudCompare can open the PLY point-cloud file produced by COLMAP. For COLMAP’s full sparse reconstruction folder, which contains camera, image, and 3D-point files, open the model in COLMAP itself or export the point cloud as PLY first.

What this installation changes

The application files live in ~/Applications/cloudcompare. The desktop entry lives in ~/.local/share/applications, so CloudCompare appears in the current user’s app grid. Runtime libraries are installed through Ubuntu’s package manager and are shared with other applications. To remove this local copy, delete those two application directories; remove the listed runtime libraries through APT only if nothing else uses them.

The Ubuntu package may not be the newest CloudCompare release. For the current Linux distribution options, see the CloudCompare download page. If you prefer automatic application updates and isolation from system libraries, use its Flathub package instead.