2016-04-03 35 views
6

Tôi muốn cài đặt treetagger trong OS X. Để làm cho nó dễ dàng hơn, tôi đã cố gắng tìm kiếm nếu điều này là có thể với Homebrew. Vì vậy, tôi nhìn vào trang web và tìm thấy số này formula từ người dùng pepijnkokke. Tiếp theo, tôi đã cố gắng để cài đặt treetagger như sau:Lỗi: inreplace không thành công khi cài đặt với homebrew?

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

Tuy nhiên, tôi đã nhận lỗi sau:

==> 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. 

tôi loại bỏ các tập tin trên và dòng sha (sha1 "d823320b718eb41a5b4fef449a711307caaf0d88") và cố gắng một lần nữa . Tuy nhiên, tôi nhận được điều này:

[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" 

Bất kỳ ý tưởng nào về cách cài đặt treetagger với homebrew ?.

Trả lời

4

Bạn đã thử cài đặt openssl qua homebrew?

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

Tại sao bạn không cài đặt nó theo cách thông thường như đã đề cập trong tài liệu?

Các bước sau đây là cần thiết để cài đặt TreeTagger (xem bên dưới cho phiên bản Windows). Tải xuống tệp bằng cách nhấp chuột phải vào liên kết. Sau đó chọn "lưu tệp dưới dạng". Tất cả các tệp phải được lưu trữ trong cùng một thư mục.

  • Tải gói tagger cho hệ thống của bạn (PC-Linux, Mac OS-X (Intel CPU), PC-Linux (phiên bản dành cho kernel cũ)).

    Tải xuống tập lệnh gắn thẻ vào cùng một thư mục.

    Tải xuống tập lệnh cài đặt install-tagger.sh.

    Tải xuống tệp tham số cho ngôn ngữ bạn muốn xử lý.

    Mở một cửa sổ terminal và chạy các kịch bản cài đặt trong thư mục mà bạn đã tải về các tập tin:

    sh install-tagger.sh

    Thực hiện một bài kiểm tra, ví dụ echo 'Xin chào thế giới!' | cmd/cây-tagger-tiếng anh

Bạn có thể muốn thêm ~/homebrew-compling/cmd và ~/homebrew-compling/bin vào biến PATH để bạn không cần phải chỉ định đường dẫn đầy đủ đến chạy tập lệnh gắn thẻ.

Điều này làm việc tốt cho tôi!

Các vấn đề liên quan