Symlink target not found: .DirIcon broken symlink causes - CC Switch
Quick fix
AppImage install fails due to broken .DirIcon symlink. Fix by converting it to a relative path.
Symptom
Section titled “Symptom”Symlink target not found:In the Linux AppImage built on Tauri for cc-switch, the `.DirIcon` file is created as a symlink pointing to an absolute path from the CI build machine (e.g., `/home/runner/work/cc-switch/.../CC Switch.png`). When users download and extract or install the AppImage locally, this absolute path does not exist, causing `AppManager` tools to error with "Symlink target not found" and fail installation.
This is a known issue in the upstream Tauri bundler (`tauri-bundler`) (see tauri-apps/tauri#15110). The project has added a workaround to the CI release pipeline: after packaging, extract the AppImage, change `.DirIcon` to a relative path, and repackage. If you are using the latest released version, this issue should be fixed. If you still encounter this error, your version may lack this fix, or you need to perform manual repair steps.
Extract the AppImage into the current directory using the --appimage-extract parameter.
Enter the extracted squashfs-root directory and check if .DirIcon points to a non-existent absolute path.
Modify the .DirIcon symlink to point to the correct relative path (usually ./CC Switch.png or similar, depending on the icon filename within your AppDir).
示例:假设图标文件名为 'CC Switch.png' cd squashfs-rootrm .DirIconln -s "CC Switch.png" .DirIconRepackage the AppImage (optional but recommended to restore executability), or try installing the extracted directory directly via AppManager.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why is my AppImage icon not displaying?
- This is usually also caused by a broken .DirIcon symlink. Please follow the repair steps above to check and correct the .DirIcon path.
- When will this problem be permanently fixed?
- This is an upstream Tauri issue (tauri-apps/tauri#15110). The CC Switch team has added temporary fix scripts in CI to ensure new releases are unaffected. The workaround can be removed after merging PR #15404 upstream.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.