V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
wyntergreg
V2EX  ›  问与答

[求助]开发机是没有编译环境的 centos,本地编译 ruby/rubygem 好以后如何直接打包安装到开发机?

  •  1
     
  •   wyntergreg · 2017-02-09 10:09:26 +08:00 · 1522 次点击
    这是一个创建于 2649 天前的主题,其中的信息可能已经有所发展或是发生改变。

    公司的开发机是阉版 centos6.5 ,不允许安装编译环境,我需要 ruby 、 rubygem 环境,只能通过本地编译安装然后打包到开发机上

    那么问题是,我需要打包那些文件? 是把安装时打印信息里的目录打包在一起吗? ruby2.4 貌似自带 gem 的,应该不需要再安装 gem 了吧

    以下是本地环境安装 ruby2.4.0 时的打印信息

    [root@data ruby-2.4.0]# make prefix=/usr/local install
    generating x86_64-linux-fake.rb
    x86_64-linux-fake.rb updated
    	CC = gcc
    	LD = ld
    	LDSHARED = gcc -shared
    	CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -std=gnu99 
    	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
    	CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/9.0.0
    	DLDFLAGS = -fstack-protector -pie  
    	SOLIBS = 
    gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
    Copyright © 2010 Free Software Foundation, Inc.
    本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
    包括没有适销性和某一专用目的下的适用性担保。
    generating encdb.h
    encdb.h unchanged
    generating enc.mk
    making srcs under enc
    make[1]: Entering directory `/root/ruby-2.4.0'
    make[1]: Nothing to be done for `srcs'.
    make[1]: Leaving directory `/root/ruby-2.4.0'
    generating transdb.h
    transdb.h unchanged
    generating makefile exts.mk
    make[1]: Entering directory `/root/ruby-2.4.0'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/array/resize'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/array/resize'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/bignum'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/bignum'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/bug-3571'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/bug-3571'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/bug-5832'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/bug-5832'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/bug_reporter'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/bug_reporter'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/class'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/class'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/debug'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/debug'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/dln/empty'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/dln/empty'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/exception'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/exception'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/fatal'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/fatal'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/file'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/file'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/float'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/float'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/funcall'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/funcall'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/gvl/call_without_gvl'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/gvl/call_without_gvl'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/hash'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/hash'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/integer'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/integer'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/iseq_load'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/iseq_load'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/iter'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/iter'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/load/dot.dot'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/load/dot.dot'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/marshal/compat'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/marshal/compat'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/marshal/internal_ivar'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/marshal/internal_ivar'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/marshal/usr'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/marshal/usr'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/memory_status'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/memory_status'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/method'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/method'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/notimplement'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/notimplement'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/num2int'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/num2int'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/path_to_class'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/path_to_class'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/popen_deadlock'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/popen_deadlock'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/postponed_job'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/postponed_job'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/printf'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/printf'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/proc'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/proc'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/rational'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/rational'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/recursion'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/recursion'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/st/foreach'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/st/foreach'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/st/numhash'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/st/numhash'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/st/update'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/st/update'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/string'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/string'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/struct'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/struct'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/symbol'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/symbol'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/time'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/time'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/tracepoint'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/tracepoint'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/typeddata'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/typeddata'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/vm'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/vm'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/-test-/wait_for_single_fd'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/-test-/wait_for_single_fd'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/bigdecimal'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/bigdecimal'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/cgi/escape'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/cgi/escape'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/continuation'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/continuation'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/coverage'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/coverage'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/date'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/date'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/dbm'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/dbm'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest/bubblebabble'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest/bubblebabble'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest/md5'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest/md5'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest/rmd160'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest/rmd160'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest/sha1'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest/sha1'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/digest/sha2'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/digest/sha2'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/etc'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/etc'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/fcntl'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/fcntl'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/fiber'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/fiber'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/fiddle'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/fiddle'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/gdbm'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/gdbm'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/io/console'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/io/console'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/io/nonblock'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/io/nonblock'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/io/wait'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/io/wait'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/json'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/json'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/json/generator'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/json/generator'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/json/parser'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/json/parser'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/mathn/complex'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/mathn/complex'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/mathn/rational'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/mathn/rational'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/nkf'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/nkf'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/objspace'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/objspace'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/openssl'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/openssl'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/pathname'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/pathname'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/psych'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/psych'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/pty'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/pty'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/racc/cparse'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/racc/cparse'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/rbconfig/sizeof'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/rbconfig/sizeof'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/readline'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/readline'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/ripper'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/ripper'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/rubyvm'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/rubyvm'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/sdbm'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/sdbm'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/socket'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/socket'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/stringio'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/stringio'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/strscan'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/strscan'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/syslog'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/syslog'
    make[2]: Entering directory `/root/ruby-2.4.0/ext/zlib'
    make[2]: Leaving directory `/root/ruby-2.4.0/ext/zlib'
    *** Following extensions failed to configure:
    ../.././ext/dbm/extconf.rb:0: Failed to configure dbm. It will not be installed.
    ../.././ext/gdbm/extconf.rb:0: Failed to configure gdbm. It will not be installed.
    ../.././ext/openssl/extconf.rb:0: Failed to configure openssl. It will not be installed.
    ../.././ext/readline/extconf.rb:0: Failed to configure readline. It will not be installed.
    ../.././ext/zlib/extconf.rb:0: Failed to configure zlib. It will not be installed.
    *** Fix the problems, then remove these directories and try again if you want.
    make[2]: Entering directory `/root/ruby-2.4.0'
    make[2]: “ ruby ”是最新的。
    make[2]: Leaving directory `/root/ruby-2.4.0'
    make[1]: Leaving directory `/root/ruby-2.4.0'
    making enc
    make[1]: Entering directory `/root/ruby-2.4.0'
    make[1]: Nothing to be done for `enc'.
    make[1]: Leaving directory `/root/ruby-2.4.0'
    making trans
    make[1]: Entering directory `/root/ruby-2.4.0'
    make[1]: Nothing to be done for `./enc/trans'.
    make[1]: Leaving directory `/root/ruby-2.4.0'
    making encs
    make[1]: Entering directory `/root/ruby-2.4.0'
    make[1]: Nothing to be done for `encs'.
    make[1]: Leaving directory `/root/ruby-2.4.0'
    ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
    installing binary commands:   /usr/local/bin
    installing base libraries:    /usr/local/lib
    installing arch files:        /usr/local/lib/ruby/2.4.0/x86_64-linux
    installing pkgconfig data:    /usr/local/lib/pkgconfig
    installing command scripts:   /usr/local/bin
    installing library scripts:   /usr/local/lib/ruby/2.4.0
    installing common headers:    /usr/local/include/ruby-2.4.0
    installing manpages:          /usr/local/share/man/man1
    installing extension objects: /usr/local/lib/ruby/2.4.0/x86_64-linux
    installing extension objects: /usr/local/lib/ruby/site_ruby/2.4.0/x86_64-linux
    installing extension objects: /usr/local/lib/ruby/vendor_ruby/2.4.0/x86_64-linux
    installing extension headers: /usr/local/include/ruby-2.4.0/x86_64-linux
    installing extension scripts: /usr/local/lib/ruby/2.4.0
    installing extension scripts: /usr/local/lib/ruby/site_ruby/2.4.0
    installing extension scripts: /usr/local/lib/ruby/vendor_ruby/2.4.0
    installing extension headers: /usr/local/include/ruby-2.4.0/ruby
    installing default gems:      /usr/local/lib/ruby/gems/2.4.0 (build_info, cache, doc, extensions, gems, specifications)
                                  bigdecimal 1.3.0
                                  io-console 0.4.6
                                  json 2.0.2
                                  psych 2.2.2
                                  rdoc 5.0.0
    installing bundle gems:       /usr/local/lib/ruby/gems/2.4.0 (build_info, cache, doc, extensions, gems, specifications)
                                  xmlrpc 0.2.1
                                  test-unit 3.2.3
                                  rake 12.0.0
                                  minitest 5.10.1
                                  did_you_mean 1.1.0
                                  power_assert 0.4.1
                                  net-telnet 0.1.1
    [root@data ruby-2.4.0]# ruby -v
    ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
    [root@data ruby-2.4.0]# which gem
    /usr/local/bin/gem
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3622 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 00:14 · PVG 08:14 · LAX 17:14 · JFK 20:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.