首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CLIion未能使用‘pkexec’启动海拔服务:完成退出代码127

CLIion未能使用‘pkexec’启动海拔服务:完成退出代码127
EN

Stack Overflow用户
提问于 2021-12-04 01:30:26
回答 1查看 439关注 0票数 2

Ubuntu20.04(运行Windows 10 WSL2) Jetbrains CLion 2021.2.3 (linux)

在CLion的Run/Debug配置中,如果我设置了“使用根权限运行”,每当我单击run或debug时,首先得到一个弹出的“启动提升服务”,然后出错。

CLion给出:Error running 'all-am': Failed to launch elevation service using 'pkexec': Process finished with exit code 127

我读了另一篇文章,上面写着要确保你没有试图执行一个“库”,而我不是。(我正在为我的项目运行可执行文件)

如果删除“使用根权限运行”,软件将运行并获得GUI,但我确实需要能够使用根权限运行/调试软件。

下面是CLion的日志的输出:

代码语言:javascript
复制
2021-12-03 20:20:14,195 [387698107]   INFO - makefile.io.MkEnvironmentAware - {LC_ALL=en_US.UTF-8, LANGUAGE=en_US.UTF-8} Running external process: "make --makefile=Makefile all-am" 
2021-12-03 20:20:14,417 [387698329]   INFO - ctest.CTestProjectTestsUpdater - No selected configuration 
2021-12-03 20:20:14,678 [387698590]   INFO - shake.ProcessHandshakeLauncher - Process [system]: pkexec /opt/clion/clion-2021.2.3/jbr/bin/java -cp /opt/clion/clion-2021.2.3/lib/platform-impl.jar:/opt/clion/clion-2021.2.3/lib/kotlin-stdlib-jdk8.jar:/opt/clion/clion-2021.2.3/lib/kotlinx-coroutines-jdk8.jar:/opt/clion/clion-2021.2.3/lib/3rd-party.jar:/opt/clion/clion-2021.2.3/lib/protobuf-java-3.15.8.jar:/opt/clion/clion-2021.2.3/lib/grpc-netty-shaded-1.34.1.jar:/opt/clion/clion-2021.2.3/lib/jna.jar com.intellij.execution.process.mediator.daemon.DaemonProcessMainKt --trampoline --daemonize --leader-pid=1118 --handshake-file=/tmp/edr5y5ec-bf9d-480f-9351-db15239171ec --token-encrypt-rsa=MIGfMA0XCCqGSIb3DQEBAQUAA4GNADCBiQFRnJCBl7rIyuaCx2NXAuxLRI8CjlTGl4Wkg66UBdwrgKe9OvXOBCLWXbuxAWvlPe0wCGlEjqlyQsA9wbiTjNL9p8rCvoQrvaaWj46wyCnnMWZxm1CHVKCiPBqwz/aD5FLCU9Fa19aPoX5OKHtWSlJ5w89Rm8Ut583nZv33P02MqeWAZAWLAQAB 
2021-12-03 20:20:14,689 [387698601]   INFO - shake.ProcessHandshakeLauncher - Process [stderr]: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address 
2021-12-03 20:20:14,691 [387698603]   INFO - shake.ProcessHandshakeLauncher - Process terminated with exit code 127 
2021-12-03 20:20:19,692 [387703604]   WARN - shake.ProcessHandshakeLauncher - Reading handshake failed 
2021-12-03 20:20:19,692 [387703604]   WARN - shake.ProcessHandshakeLauncher - Process finished with exit code 127 
2021-12-03 20:20:19,692 [387703604]   WARN - shake.ProcessHandshakeLauncher - Process stderr:
Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
 
2021-12-03 20:20:19,695 [387703607]   INFO - xecution.runners.ExecutionUtil - Error running 'all-am':<br>Failed to launch elevation service using 'pkexec':
Process finished with exit code 127 
com.intellij.execution.ExecutionException: Failed to launch elevation service using 'pkexec':
Process finished with exit code 127
    at com.intellij.execution.process.elevation.ElevationDaemonProcessLauncher.handshakeFailed(ElevationDaemonProcessLauncher.kt:99)
    at com.intellij.execution.process.elevation.ElevationDaemonProcessLauncher.handshakeFailed(ElevationDaemonProcessLauncher.kt:22)
    at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher.handshakeFailed(ProcessHandshakeLauncher.kt:129)
    at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher.access$handshakeFailed(ProcessHandshakeLauncher.kt:29)
    at com.intellij.util.io.processHandshake.ProcessHandshakeLauncher$launch$2.invokeSuspend(ProcessHandshakeLauncher.kt:88)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.selects.SelectBuilderImpl.resumeWith(Select.kt:302)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

任何帮助都很感激!谢谢!

EN

回答 1

Stack Overflow用户

发布于 2022-09-06 10:12:18

这个问题似乎是由WSL2发行版中缺少一个运行中的dbusd引起的。运行pkexec独立应该也会出错。

根据您的发行版(Ubuntu),您可以通过sudo service dbus start启动dbus。

我确实在WSL中使用了arch,这里似乎涉及到更多的工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70222358

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档