jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.16k stars 1.07k forks source link

Cannot launch fpm on Ubuntu 18 (GemNotFoundException) #1625

Open Overdrivr opened 5 years ago

Overdrivr commented 5 years ago

Hi, I followed installation instructions, yet cannot achieve proper installation. fpm --version fails.

$ sudo apt-get install ruby ruby-dev rubygems build-essential -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'ruby' instead of 'rubygems'
build-essential is already the newest version (12.4ubuntu1).
The following additional packages will be installed:
  fonts-lato libruby2.5 rake ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5 ruby2.5-dev ruby2.5-doc rubygems-integration
Suggested packages:
  ri bundler
The following NEW packages will be installed:
  fonts-lato libruby2.5 rake ruby ruby-dev ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5 ruby2.5-dev ruby2.5-doc rubygems-integration
0 upgraded, 14 newly installed, 0 to remove and 215 not upgraded.
Need to get 7873 kB of archives.
After this operation, 45.8 MB of additional disk space will be used.
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 fonts-lato all 2.0-2 [2698 kB]
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 rubygems-integration all 1.11 [4994 B]
Get:3 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ruby2.5 amd64 2.5.1-1ubuntu1.1 [48.6 kB]
Get:4 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby amd64 1:2.5.1 [5712 B]
Get:5 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 rake all 12.3.1-1 [45.1 kB]
Get:6 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-did-you-mean all 1.2.0-2 [9700 B]
Get:7 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-minitest all 5.10.3-1 [38.6 kB]
Get:8 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-net-telnet all 0.1.1-2 [12.6 kB]
Get:9 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-power-assert all 0.3.0-1 [7952 B]
Get:10 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-test-unit all 3.2.5-1 [61.1 kB]
Get:11 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libruby2.5 amd64 2.5.1-1ubuntu1.1 [3066 kB]
Get:12 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ruby2.5-dev amd64 2.5.1-1ubuntu1.1 [63.7 kB]
Get:13 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic/main amd64 ruby-dev amd64 1:2.5.1 [4604 B]
Get:14 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ruby2.5-doc all 2.5.1-1ubuntu1.1 [1806 kB]
Fetched 7873 kB in 0s (37.6 MB/s)
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Selecting previously unselected package fonts-lato.
(Reading database ... 207083 files and directories currently installed.)
Preparing to unpack .../00-fonts-lato_2.0-2_all.deb ...
Unpacking fonts-lato (2.0-2) ...
Selecting previously unselected package rubygems-integration.
Preparing to unpack .../01-rubygems-integration_1.11_all.deb ...
Unpacking rubygems-integration (1.11) ...
Selecting previously unselected package ruby2.5.
Preparing to unpack .../02-ruby2.5_2.5.1-1ubuntu1.1_amd64.deb ...
Unpacking ruby2.5 (2.5.1-1ubuntu1.1) ...
Selecting previously unselected package ruby.
Preparing to unpack .../03-ruby_1%3a2.5.1_amd64.deb ...
Unpacking ruby (1:2.5.1) ...
Selecting previously unselected package rake.
Preparing to unpack .../04-rake_12.3.1-1_all.deb ...
Unpacking rake (12.3.1-1) ...
Selecting previously unselected package ruby-did-you-mean.
Preparing to unpack .../05-ruby-did-you-mean_1.2.0-2_all.deb ...
Unpacking ruby-did-you-mean (1.2.0-2) ...
Selecting previously unselected package ruby-minitest.
Preparing to unpack .../06-ruby-minitest_5.10.3-1_all.deb ...
Unpacking ruby-minitest (5.10.3-1) ...
Selecting previously unselected package ruby-net-telnet.
Preparing to unpack .../07-ruby-net-telnet_0.1.1-2_all.deb ...
Unpacking ruby-net-telnet (0.1.1-2) ...
Selecting previously unselected package ruby-power-assert.
Preparing to unpack .../08-ruby-power-assert_0.3.0-1_all.deb ...
Unpacking ruby-power-assert (0.3.0-1) ...
Selecting previously unselected package ruby-test-unit.
Preparing to unpack .../09-ruby-test-unit_3.2.5-1_all.deb ...
Unpacking ruby-test-unit (3.2.5-1) ...
Selecting previously unselected package libruby2.5:amd64.
Preparing to unpack .../10-libruby2.5_2.5.1-1ubuntu1.1_amd64.deb ...
Unpacking libruby2.5:amd64 (2.5.1-1ubuntu1.1) ...
Selecting previously unselected package ruby2.5-dev:amd64.
Preparing to unpack .../11-ruby2.5-dev_2.5.1-1ubuntu1.1_amd64.deb ...
Unpacking ruby2.5-dev:amd64 (2.5.1-1ubuntu1.1) ...
Selecting previously unselected package ruby-dev:amd64.
Preparing to unpack .../12-ruby-dev_1%3a2.5.1_amd64.deb ...
Unpacking ruby-dev:amd64 (1:2.5.1) ...
Selecting previously unselected package ruby2.5-doc.
Preparing to unpack .../13-ruby2.5-doc_2.5.1-1ubuntu1.1_all.deb ...
Unpacking ruby2.5-doc (2.5.1-1ubuntu1.1) ...
Setting up fonts-lato (2.0-2) ...
Setting up ruby-did-you-mean (1.2.0-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up ruby-net-telnet (0.1.1-2) ...
Setting up rubygems-integration (1.11) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up ruby2.5-doc (2.5.1-1ubuntu1.1) ...
Setting up ruby-minitest (5.10.3-1) ...
Processing triggers for fontconfig (2.12.6-0ubuntu2) ...
Setting up ruby-power-assert (0.3.0-1) ...
Setting up ruby2.5 (2.5.1-1ubuntu1.1) ...
Setting up ruby (1:2.5.1) ...
Setting up ruby-test-unit (3.2.5-1) ...
Setting up rake (12.3.1-1) ...
Setting up libruby2.5:amd64 (2.5.1-1ubuntu1.1) ...
Setting up ruby2.5-dev:amd64 (2.5.1-1ubuntu1.1) ...
Setting up ruby-dev:amd64 (1:2.5.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

$ sudo gem install --no-ri --no-rdoc fpm
Fetching: json-1.8.6.gem (100%)
Building native extensions. This could take a while...
Successfully installed json-1.8.6
Fetching: cabin-0.9.0.gem (100%)
Successfully installed cabin-0.9.0
Fetching: backports-3.12.0.gem (100%)
Successfully installed backports-3.12.0
Fetching: arr-pm-0.0.10.gem (100%)
Successfully installed arr-pm-0.0.10
Fetching: clamp-1.0.1.gem (100%)
Successfully installed clamp-1.0.1
Fetching: ffi-1.10.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.10.0
Fetching: childprocess-0.9.0.gem (100%)
Successfully installed childprocess-0.9.0
Fetching: io-like-0.3.0.gem (100%)
Successfully installed io-like-0.3.0
Fetching: ruby-xz-0.2.3.gem (100%)
Successfully installed ruby-xz-0.2.3
Fetching: stud-0.0.23.gem (100%)
Successfully installed stud-0.0.23
Fetching: mustache-0.99.8.gem (100%)
Successfully installed mustache-0.99.8
Fetching: insist-1.0.0.gem (100%)
Successfully installed insist-1.0.0
Fetching: dotenv-2.7.2.gem (100%)
Successfully installed dotenv-2.7.2
Fetching: pleaserun-0.0.30.gem (100%)
Successfully installed pleaserun-0.0.30
Fetching: fpm-1.11.0.gem (100%)
Successfully installed fpm-1.11.0
15 gems installed

$ fpm --version
Traceback (most recent call last):
    2: from /usr/local/bin/fpm:23:in `<main>'
    1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem fpm (>= 0.a) with executable fpm (Gem::GemNotFoundException)

Any idea ?

biocyberman commented 3 years ago

It's a bit late, but for future reader: sudo fpm <...> works.

yykoypj commented 2 months ago

It's a bit late, but for future reader: sudo fpm <...> works.

but why,and how to fix it?