在命令行终端下直接使用Linux 命令:apt install gem无法直接安装gem,反而安装了gemtopbm与gemtophm,那么只需使用下面的命令就能安装上gem(Kali Linux与Mac OS是直接附带的gem,可以直接使用命令安装,其他Linux可以借鉴下面的方法)
首先安装gem,虽然安装不上
sudo apt install gem
然后安装bundler,通过bundler调整(跟ruby有关)
sudo apt-get install bundler
root@root:~/Desktop$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
http://localhost:8808/
with info about installed gems
Further information:
http://guides.rubygems.org
发现gem已经可用了,然后直接使用命令gem install zsteg即可安装成功
root@root:~/Desktop$ sudo gem install zsteg
Fetching: iostruct-0.0.4.gem (100%)
Successfully installed iostruct-0.0.4
Fetching: rainbow-3.0.0.gem (100%)
Successfully installed rainbow-3.0.0
Fetching: zpng-0.2.5.gem (100%)
Successfully installed zpng-0.2.5
Fetching: zsteg-0.1.2.gem (100%)
Successfully installed zsteg-0.1.2
Parsing documentation for iostruct-0.0.4
Installing ri documentation for iostruct-0.0.4
Parsing documentation for rainbow-3.0.0
Installing ri documentation for rainbow-3.0.0
Parsing documentation for zpng-0.2.5
Installing ri documentation for zpng-0.2.5
Parsing documentation for zsteg-0.1.2
Installing ri documentation for zsteg-0.1.2
Done installing documentation for iostruct, rainbow, zpng, zsteg after 1 seconds
4 gems installed