【问题标题】:GNU Prolog (glpc): error trying to execute as: No such file or directoryGNU Prolog(glpc):尝试执行时出错:没有这样的文件或目录
【发布时间】:2022-12-03 15:01:41
【问题描述】:

我正在尝试使用 GNU Prolog 编译器从我的 Prolog 程序构建可执行文件,如下所示:

$ gplc solution.prolog -o prog

它因一个非常神秘的错误而失败:

error trying to execute as: No such file or directory

我无法弄清楚它试图告诉我的内容丢失了。有人知道吗?

我正在使用 Fedora Silverblue 37,而 glpc 在也是 Fedora 37 的“工具箱”中运行。

【问题讨论】:

    标签: linux prolog fedora gnu-prolog


    【解决方案1】:

    问题似乎是我没有安装 C 编译器。我安装了 gcc 包,得到了一个不同的错误:

    gcc: fatal error: cannot read spec file ‘/usr/lib/rpm/redhat/redhat-hardened-ld’: No such file or directory
    

    显然要获取该文件,我需要安装 redhat-rpm-config 包。我从this relevant comment on the RedHat bugzilla 找到了那个包名。

    现在编译成功!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-28
      • 2017-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-11
      • 1970-01-01
      • 2012-08-08
      相关资源
      最近更新 更多