首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行命令$ jhbuild时jhbuild安装出现问题

运行命令$ jhbuild时jhbuild安装出现问题
EN

Stack Overflow用户
提问于 2015-03-18 06:36:37
回答 2查看 2K关注 0票数 3

我正试着学习GTK+3,根据这个网站:https://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html。从这一页:

1.1。依赖关系

  • GTK+3
  • Python 2 (2.6或更高版本)或Python 3 (3.1或更高版本)
  • 自省

..。

从源代码安装PyGObject的最简单方法是使用JHBuild。它的目的是方便地构建源代码包,并发现需要构建哪些依赖项以及按什么顺序构建。要安装JHBuild,请按照JHBuild手册进行操作。

我按照该链接遵循手册,并通过git JHBuild下载(正如他们所说的那样),并使用make/ manual构建它。进展得很好。下一步是问题开始的地方。我按照页面运行了下一个命令:

2.3. 构建先决条件 在构建任何模块之前,必须安装特定的构建工具。常见的构建工具包括(autoconf、automake、libtool和gettext)、GNU工具链(binutils、gcc、g++)、make、pkg-config和Python,具体取决于将要构建的模块。 JHBuild可以使用sanitycheck命令检查安装的工具: $ jhbuild sanitycheck

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

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

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

代码语言:javascript
复制
daddara@daddara-desktop:~/jhbuild/jhbuild$ sudo chmod 777 /opt/gnome/ -R
chmod: cannot access `/opt/gnome/': No such file or directory
daddara@daddara-desktop:~/jhbuild/jhbuild$ mkdir /opt/gnome
mkdir: cannot create directory `/opt/gnome': Permission denied
daddara@daddara-desktop:~/jhbuild/jhbuild$ jhbuild sanitycheck
jhbuild: install prefix (/opt/gnome) can not be created
daddara@daddara-desktop:~/jhbuild/jhbuild$ chmod 777 /opt/gnome/ -R
chmod: cannot access `/opt/gnome/': No such file or directory
daddara@daddara-desktop:~/jhbuild/jhbuild$ sudo chmod 777 /opt/gnome/ -R
chmod: cannot access `/opt/gnome/': No such file or directory
daddara@daddara-desktop:~/jhbuild/jhbuild$ jhbuild sanitycheck
jhbuild: install prefix (/opt/gnome) can not be created
daddara@daddara-desktop:~/jhbuild/jhbuild$ mkdir -p /opt/gnome
mkdir: cannot create directory `/opt/gnome': Permission denied

安装有什么问题吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-03-18 06:47:10

您需要使用/opt/gnome创建sudo mkdir,然后使用sudo chmod设置其权限。你把sudo忘在mkdir里了。

票数 2
EN

Stack Overflow用户

发布于 2017-05-26 18:10:32

对于我来说,jhbuild也失败了,错误是:

代码语言:javascript
复制
jhbuild: install prefix (/opt/gnome) can not be created

在我的例子中,问题是我意外地在gnome图标主题模块中做了一个sudo make install,所以这个命令创建了/opt/gnome目录并安装在它里面--gnome图标-主题文件,然后我对jhbuild run gedit进行了处理,然后出现了前面提到的错误,这是因为jhbuild会自动使用/opt/gnome (为了向后兼容),如果不存在,那么就会使用推荐的方式使用~/jhbuild/install,您可以看到这里

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

希望这个答案能帮助人们从谷歌搜索(/opt/gnome) can not be created错误。

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

https://stackoverflow.com/questions/29115599

复制
相关文章

相似问题

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