简体   繁体   English

无法通过MacPorts安装Meld

[英]Unable to install Meld by MacPorts

I found that other people too have had trouble in installing Meld to Mac by MacPorts. 我发现其他人也很难通过MacPorts将Meld安装到Mac上。

I run 我跑

sudo port install meld 

I get 我明白了

sudo port install meld  
 --->  Activating shared-mime-info @0.60_0
Error: Target org.macports.activate returned: Image error: /opt/local/bin/update-mime-database already exists and does not belong to a registered port.  Unable to activate port shared-mime-info.
Error: The following dependencies failed to build: py25-gnome gconf gtk2 shared-mime-info orbit2 libidl gnome-vfs desktop-file-utils gnome-mime-data libbonobo libbonoboui libglade2 libgnome esound audiofile libgnomecanvas libart_lgpl libgnomeui gnome-icon-theme hicolor-icon-theme icon-naming-utils p5-xml-simple p5-xml-namespacesupport p5-xml-sax gnome-keyring libtasn1 py25-gtk py25-cairo py25-numpy py25-nose py25-gobject py25-orbit
Error: Status 1 encountered during processing. 

How can you install Meld to Mac? 如何将Meld安装到Mac?

As rspeed said, you probably had a bad install or upgrade that created that file. 正如rspeed所说,你可能有一个糟糕的安装或升级创建该文件。 Alternately, you installed something outside of macports into the /opt/local tree (though I'm not sure how you would have ended up doing that). 或者,你在macports之外安装了一些东西到/ opt / local树中(虽然我不知道你最终会怎么做)。 I recommend just doing a force activate of the shared-mime-info port, then trying to reinstall meld. 我建议只需强制激活shared-mime-info端口,然后尝试重新安装融合。

sudo port activate -f shared-mime-info
sudo port install meld

I found that MacPorts worked to install meld, but it didn't work straight away as advertised. 我发现MacPorts可以安装meld,但它并没有像宣传的那样立即发挥作用。

After running and installing all the dependencies, it failed, and gave a cryptic log message similar to the one in this question (but not identical). 运行并安装所有依赖项后,它失败了,并提供了一个类似于此问题中的隐藏日志消息(但不完全相同)。

After a bit of digging around I found I had to do the following: 经过一番挖掘后,我发现我必须做以下事情:

Make sure I had properly agreed to the license for XCode 确保我已正确同意XCode的许可证

xcodebuild -license

Install the Xcode command line tools 安装Xcode命令行工具

xcode-select --install

Install rarian (it seems to be a dependency that MacPorts failed to recognize) 安装rarian(它似乎是MacPorts无法识别的依赖项)

sudo port install rarian

The latter instructions come from here: http://www.codez.co.uk/2014/02/meld-on-mac-osx-mavericks-10-9/ and this was the last step before I was able to get it working. 后面的说明来自这里: http//www.codez.co.uk/2014/02/meld-on-mac-osx-mavericks-10-9/这是我能够得到它之前的最后一步工作。

Installing meld on OS X 10.10. 在OS X 10.10上安装meld。 For added difficulty, must use OS X's quartz display server (rather than X11 display server): 为了增加难度,必须使用OS X的石英显示服务器(而不是X11显示服务器):

$ sudo port install python27
$ sudo port select --set python python27
$ sudo port install rarian
$ sudo port install pango +no_x11
$ sudo port install gtk2 +quartz
$ sudo port install py27-pygtk +quartz
$ sudo port uninstall --follow-dependents gtk3
$ sudo port install gtk3
$ sudo port uninstall py27-pygtksourceview
$ sudo port install py27-pygtksourceview +quartz
$ sudo port install gnome-desktop
$ sudo port install meld +quartz

$ sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
$ sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

<reboot system...>

$ meld

Wow, it works! 哇,它的作品!

Somehow that file already exists, probably from a bad uninstall or upgrade. 不知何故,该文件已经存在,可能来自糟糕的卸载或升级。

If you force the install it probably won't break anything. 如果你强制安装它可能不会破坏任何东西。

sudo port install --force meld

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM