gpt4 book ai didi

linux - 使用 Electron Builder 构建 appImage 时出现 "Symlink operation not permitted"错误

转载 作者:行者123 更新时间:2023-12-03 12:39:24 25 4
gpt4 key购买 nike

我是 Electron 的新手,我正在尝试导出我在游戏引擎中制作的游戏。我习惯使用 appImage,因为引擎没有本地导出到 Linux 选项。
我不知道我是否正确,我有点将责任归咎于与图标和/或“符号链接(symbolic link)”相关的事情,只是无法正常工作。如果有人可以帮助我解决我的问题或纠正我,我将不胜感激。
这是我终端的日志:

> electron-builder build --linux --x64

• electron-builder version=22.8.0 os=5.4.0-26-generic
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=linux arch=x64 electron=9.1.2 appOutDir=dist/linux-unpacked
• building target=AppImage arch=x64 file=dist/game-test-1.0.0.AppImage
⨯ symlink usr/share/icons/hicolor/256x256/apps/test-app.png /home/voy/shared/electron/test-app/dist/__appImage-x64/test-app.png: operation not permitted
github.com/develar/app-builder/pkg/package-format/appimage.copyIcons.func1.1
/Volumes/data/Documents/app-builder/pkg/package-format/appimage/appLauncher.go:82
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
/Volumes/data/Documents/app-builder/pkg/util/async.go:68
runtime.goexit
/usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/asm_amd64.s:1373
⨯ /home/voy/shared/electron/test-app/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: /home/voy/shared/electron/test-app/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/home/voy/shared/electron/test-app/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:421:26)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1051:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-app@1.0.0 build-linux: `electron-builder build --linux --x64`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-app@1.0.0 build-linux script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/voy/.npm/_logs/2020-08-08T03_53_51_086Z-debug.log
这是我的 package.json:
  "name": "test-app",
"productName": "game-test",
"version": "1.0.0",
"description": "My Electron application description",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\"",
"build-installer": "electron-builder",
"build-win": "electron-builder build --win --x64",
"build-linux": "electron-builder build --linux --x64"
},
"build": {
"appId": "test-app",
"win": {
"target": ["portable"],
"icon": "src/icon.ico",
"requestedExecutionLevel": "asInvoker"
},
"linux": {
"target": ["appImage"],
"icon": "src/256x256.png",
"category": "Utility"
}
},
"keywords": [],
"author": "VoyVivika",
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "test_app"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {
"name": "test_app"
}
},
{
"name": "@electron-forge/maker-rpm",
"config": {
"name": "test_app"
}
}
]
}
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0"
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.52",
"@electron-forge/maker-deb": "^6.0.0-beta.52",
"@electron-forge/maker-rpm": "^6.0.0-beta.52",
"@electron-forge/maker-squirrel": "^6.0.0-beta.52",
"@electron-forge/maker-zip": "^6.0.0-beta.52",
"electron": "9.1.2"
}
}

最佳答案

好的,所以我想出了我的问题。我在虚拟机中运行我的 Linux,我在共享文件夹上运行命令,我假设虚拟机没有完全访问权限(它是一个共享文件夹,当然它不会),我从直接共享到虚拟机中更本地的位置并且它工作。

关于linux - 使用 Electron Builder 构建 appImage 时出现 "Symlink operation not permitted"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63311710/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com