Skip to content

.deb package fails to install: cross-device hard link error for icon file #1703

@diarized

Description

@diarized

Bug Report

Version: 0.2.40
OS: Linux (any distro where /tmp and /usr are on different filesystems)

Problem

Installing the .deb downloaded from the website fails with:

dpkg: error processing archive open-interpreter-linux-amd64.deb (--install):
 error creating hard link './usr/share/icons/hicolor/1024x1024/apps/interpreter.png':
 Invalid cross-device link

Root Cause

The data.tar inside the .deb contains a hard link:

./usr/share/icons/hicolor/1024x1024/apps/interpreter.png
  → hard link to ./opt/Interpreter/resources/icons/app.png

dpkg extracts to a temp directory (typically on tmpfs at /tmp), then tries to create the hard link targeting a path that resolves to the main filesystem (ext4/btrfs/etc). Hard links cannot span filesystems — hence the error.

This is a known electron-builder behavior.

Fix

Break the hard link in the build pipeline after electron-builder runs, replacing it with an independent copy:

cp --remove-destination \
  dist/linux-unpacked/resources/icons/app.png \
  dist/linux-unpacked/usr/share/icons/hicolor/1024x1024/apps/interpreter.png

cp --remove-destination unlinks the destination first (breaking the hard link) before copying, ensuring the result is an independent file with its own inode.


This bug report was created by AI, but it was me (human) who the problem detected and a workaround tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions