【问题标题】:Trouble with jhbuild installation while running the command $ jhbuild sanitycheck运行命令 $ jhbuild sanitycheck 时出现 jhbuild 安装问题
【发布时间】:2015-05-20 20:32:43
【问题描述】:

我正在尝试按照这个站点学习 GTK+3:https://python-gtk-3tutorial.readthedocs.org/en/latest/install.html。从页面:

1.1。依赖关系

GTK+3 Python 2(2.6 或更高版本)或 Python 3(3.1 或更高版本) gobject-introspection 从源代码安装 PyGObject 的最简单方法是使用 JHBuild。它旨在轻松构建源代码包并发现需要构建哪些依赖项以及以什么顺序构建。要设置 JHBuild,请遵循 JHBuild 手册。 我按照该链接遵循手册并通过 git JHBuild 下载(正如他们所说的那样)并使用 make/make install 构建它。一切顺利。下一步是问题开始的地方。 我按照页面运行了我应该执行的下一个命令: 2.3.构建先决条件

在构建任何模块之前,必须安装某些构建工具。常见的构建工具包括 GNU Autotools(autoconf、automake、libtool 和 gettext)、GNU 工具链(binutils、gcc、g++)、make、pkg-config 和 Python,具体取决于将要构建的模块。

JHBuild 可以使用 sanitycheck 命令检查工具是否安装:

$ jhbuild 健全性检查

当我第一次运行这个时,我得到了这个:

jhbuild:无法创建安装前缀(/opt/gnome)

我运行了以下命令并得到以下结果:

daddara@daddara-desktop:~/jhbuild/jhbuild$ sudo chmod 777 /opt/gnome/ -R chmod:无法访问/opt/gnome/': No such file or directory daddara@daddara-desktop:~/jhbuild/jhbuild$ mkdir /opt/gnome mkdir: cannot create directory/opt/gnome':权限被拒绝 daddara@daddara-desktop:~/jhbuild/jhbuild$ jhbuild sanitycheck jhbuild:无法创建安装前缀 (/opt/gnome) daddara@daddara-desktop:~/jhbuild/jhbuild$ chmod 777 /opt/gnome/ -R chmod:无法访问/opt/gnome/': No such file or directory daddara@daddara-desktop:~/jhbuild/jhbuild$ sudo chmod 777 /opt/gnome/ -R chmod: cannot access/opt/gnome/':没有这样的文件或目录 daddara@daddara-desktop:~/jhbuild/jhbuild$ jhbuild sanitycheck jhbuild:无法创建安装前缀 (/opt/gnome) daddara@daddara-desktop:~/jhbuild/jhbuild$ mkdir -p /opt/gnome mkdir:无法创建目录`/opt/gnome':权限被拒绝

请帮我解决这个问题.. 有谁知道安装有什么问题吗? 谢谢。

【问题讨论】:

  • 您不应该使用sanitycheck 命令:就像bootstrap 命令一样,它并不是真的要在现代Linux 发行版上使用。您应该阅读 GNOME wiki 上的文档:wiki.gnome.org/HowDoI/Jhbuild

标签: gtk gnome jhbuild


【解决方案1】:

您需要将/opt/gnome 设置为sudo mkdir然后使用sudo chmod 设置其权限。您忘记了mkdir 中的sudo

【讨论】:

    【解决方案2】:

    jhbuild 也因错误而失败:

    jhbuild: install prefix (/opt/gnome) can not be created
    

    在我的例子中,问题是我不小心在 gnome-icon-theme 模块中做了一个sudo make install,所以这个命令创建了/opt/gnome 目录并在其中安装了 gnome-icon-theme 文件,然后我是到jhbuild run gedit 出现上述错误,这是因为如果存在/opt/gnome,jhbuild 将自动使用/opt/gnome(为了向后兼容),如果不存在则使用推荐的方式使用~/jhbuild/install,你可以看到here.

    所以在这种情况下,由于/opt/gnome 中的唯一文件是我通过sudo make install 命令意外安装的文件,因此解决方案只是删除此目录(例如通过执行sudo rm -rf /opt/gnome),然后,命令jhbuild run any-gnome-app 再次正常工作。

    希望这个答案可以帮助从谷歌搜索(/opt/gnome) can not be created错误来到这里的人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多