0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Debian 10 (buster) にtranslate-shellをインストール

Last updated at Posted at 2020-10-17

Debian 10 (buster) ではデフォルトでtranslate-shellをaptでインストール不可で、検索しても直ぐに情報が出てこなかったので、ここに投稿しておこうと思う。
なお、translate-shellとはGoogle翻訳を呼び出すコマンドである。

translate-shellをaptでインストールするには、事前にcontribリポジトリを追加する。

# echo "deb http://ftp.de.debian.org/debian buster main contrib" > /etc/apt/sources.list.d/contrib.list
# apt update
# apt install translate-shell

参考: https://packages.debian.org/buster/all/translate-shell/download

これでシェル上で翻訳ができるので、とても便利である。

$ trans -b en:ja "hello world!"
こんにちは世界!

2020/10/21追記

デフォルトでインストール可能な他のLinuxディストリビューションで以下のエラーが出力された場合、バージョンアップすると良い。

[ERROR] Null response.
[ERROR] Oops! Something went wrong and I can't translate it for you :(

実際にはバージョンチェックを行い、最新版をダウンロードして、既存のファイルを更新する。

$ sudo trans -U
Current version:        0.9.2.1
New version available:  0.9.6.12
Download from:  http://www.soimort.org/translate-shell/trans
$ sudo wget http://www.soimort.org/translate-shell/trans
$ sudo chmod +x trans
$ sudo mv trans `which trans`
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?