2016-04-03 74 views
6

我想在OS X中安装treetagger。为了使它更容易,我试图搜索这是否可能与家酿。所以我看着网页,从pepijnkokke用户那里找到这个formula。接下来,我尝试按以下步骤安装treetagger:错误:使用自制软件安装时,inreplace失败?

[email protected]:~$ brew install /Users/user/Downloads/tree-tagger.rb 

但是,我得到了以下错误:

==> Installing dependencies for tree-tagger: openssl, wget 
==> Installing tree-tagger dependency: openssl 
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2g.el_capitan. 
######################################################################## 100.0% 
==> Pouring openssl-1.0.2g.el_capitan.bottle.tar.gz 
==> Caveats 
A CA file has been bootstrapped using certificates from the system 
keychain. To add additional certificates, place .pem files in 
    /usr/local/etc/openssl/certs 

and run 
    /usr/local/opt/openssl/bin/c_rehash 

This formula is keg-only, which means it was not symlinked into /usr/local. 

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries 

Generally there are no consequences of this for you. If you build your 
own software and it requires this formula, you'll need to add to your 
build variables: 

    LDFLAGS: -L/usr/local/opt/openssl/lib 
    CPPFLAGS: -I/usr/local/opt/openssl/include 

==> Summary 
    /usr/local/Cellar/openssl/1.0.2g: 1,678 files, 12.0M 
==> Installing tree-tagger dependency: wget 
==> Downloading https://homebrew.bintray.com/bottles/wget-1.17.1.el_capitan.bot 
######################################################################## 100.0% 
==> Pouring wget-1.17.1.el_capitan.bottle.1.tar.gz 
    /usr/local/Cellar/wget/1.17.1: 9 files, 1.5M 
==> Installing tree-tagger 
==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr 
######################################################################## 100.0% 
Warning: SHA1 support is deprecated and will be removed in a future version. 
Please switch this formula to SHA256. 
Error: SHA1 mismatch 
Expected: d823320b718eb41a5b4fef449a711307caaf0d88 
Actual: 340e09912101acd996642eeed8f623315fa6d672 
Archive: /Library/Caches/Homebrew/tree-tagger-3.2.tar.gz 
To retry an incomplete download, remove the file above. 

我删除了上述文件和沙线(SHA1“d823320b718eb41a5b4fef449a711307caaf0d88”),并再次尝试。不过,我得到了这个:

[email protected]:~$ brew install /Users/user/Downloads/tree-tagger.rb==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr 
######################################################################## 100.0% 
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tagger-sc 
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-p 
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-c 
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/install-t 
==> chmod +x ./install-tagger.sh 
==> ./install-tagger.sh 
Error: inreplace failed 
cmd/chunker-read-lemma.perl: 
    expected replacement of /BIN=.*/ with "BIN=/usr/local/Cellar/tree-tagger/3.2/libexec/bin" 
    expected replacement of /CMD=.*/ with "CMD=/usr/local/Cellar/tree-tagger/3.2/libexec/cmd" 
    expected replacement of /LIB=.*/ with "LIB=/usr/local/Cellar/tree-tagger/3.2/libexec/lib" 

任何想法如何安装treetagger与自制软件?

回答

4

您是否试图通过自制软件安装openssl

brew install openssl 
brew link openssl --force 
brew install treehugger 
4

为什么不按照文档中提到的正常方式安装?

安装TreeTagger需要以下步骤(请参阅下面的Windows版本)。通过右键单击链接下载文件。然后选择“保存文件为”。所有文件应该存储在同一个目录中。

  • 下载恶搞包为您的系统(PC-在Linux,Mac OS-X (Intel的CPU),Linux PC的(对于老版本的内核版本))。

    将标记脚本下载到相同的目录中。

    下载安装脚本install-tagger.sh。

    下载要处理的语言的参数文件。

    打开一个终端窗口,并运行在 目录,你已经下载的文件的安装脚本:

    SH install-tagger.sh

    做一个测试,例如回声'Hello world!' | CMD /树恶搞英语

您可能要到〜/自制-compling/CMD和〜/自制-compling/bin加入到PATH变量,这样你就不需要指定的完整路径运行标记脚本。

这对我很好!

相关问题