安装unf_ext(0.0.7.2)时出错,bundler无法继续

fcg9iug3  于 2022-10-15  发布在  Ruby
关注(0)|答案(4)|浏览(130)

我试着把散居者安装到本地主机上。我删除了Gemfile.lock文件并尝试了bundle install,现在看到了这个。
这些都是我已经尝试过的东西

  • ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install unf_ext
  • xcode-select --install
  • sudo xcodebuild -license
  1. Krishnas-MacBook-Air:diaspora KrishnaTeja$ bundle install
  2. Fetching gem metadata from https://rails-assets.org/....
  3. Fetching version metadata from https://rails-assets.org/..
  4. Fetching dependency metadata from https://rails-assets.org/..
  5. Fetching gem metadata from https://rubygems.org/.......
  6. Fetching version metadata from https://rubygems.org/..
  7. Fetching dependency metadata from https://rubygems.org/.
  8. Resolving dependencies..............................
  9. Using rake 11.3.0
  10. Using CFPropertyList 2.3.4
  11. Using i18n 0.7.0
  12. Using json 1.8.3
  13. Using minitest 5.10.1
  14. Using thread_safe 0.3.5
  15. Using builder 3.2.2
  16. Using erubis 2.7.0
  17. Using mini_portile2 2.1.0
  18. Using rack 1.6.5
  19. Using mime-types-data 3.2016.0521
  20. Using arel 6.0.3
  21. Using addressable 2.4.0
  22. Using excon 0.54.0
  23. Using formatador 0.2.5
  24. Using multi_json 1.12.1
  25. Using ipaddress 0.8.3
  26. Using xml-simple 1.1.5
  27. Using inflecto 0.0.2
  28. Using trollop 2.1.2
  29. Your user account isn't allowed to install to the system Rubygems.
  30. You can cancel this installation and run:
  31. bundle install --path vendor/bundle
  32. to install the gems into ./vendor/bundle/, or you can enter your password
  33. and install the bundled gems to Rubygems using sudo.
  34. Password:
  35. Installing unf_ext 0.0.7.2 with native extensions
  36. Using ast 2.3.0
  37. Using attr_required 1.0.1
  38. Using execjs 2.7.0
  39. Using coffee-script-source 1.11.1
  40. Using eco-source 1.1.0.rc.1
  41. Using ejs 1.1.1
  42. Using thor 0.19.4
  43. Installing bcrypt 3.1.11 with native extensions
  44. Using bindata 2.3.4
  45. Using sass 3.4.22
  46. Using bootstrap-switch-rails 3.3.3
  47. Using buftok 0.2.0
  48. Using bundler 1.13.6
  49. Installing byebug 9.0.6 with native extensions
  50. Using mimemagic 0.3.2
  51. Installing hitimes 1.2.4 with native extensions
  52. Installing nio4r 1.2.1 with native extensions
  53. Using chunky_png 1.3.8
  54. Using cliver 0.3.2
  55. Using coderay 1.1.1
  56. Using rb-fsevent 0.9.7
  57. Using ffi 1.9.14
  58. Using hike 1.2.3
  59. Using tilt 1.4.1
  60. Using concurrent-ruby 1.0.2
  61. Using configurate 0.3.1
  62. Using connection_pool 2.2.1
  63. Using docile 1.1.5
  64. Using simplecov-html 0.10.0
  65. Using tins 1.13.0
  66. Using safe_yaml 1.0.4
  67. Using gherkin 4.0.0
  68. Using cucumber-wire 0.0.1
  69. Using diff-lcs 1.2.5
  70. Using multi_test 0.1.2
  71. Using rspec-support 3.5.0
  72. Using database_cleaner 1.5.3
  73. Using orm_adapter 0.5.0
  74. Using diaspora-prosody-config 0.0.7
  75. Using multipart-post 2.0.0
  76. Using valid 1.2.0
  77. Using equalizer 0.0.10
  78. Installing sigar 0.7.3 with native extensions
  79. Using state_machine 1.2.0
  80. Using ruby-progressbar 1.8.1
  81. Using get_process_mem 0.2.1
  82. Using multi_xml 0.5.5
  83. Using unicode-display_width 1.1.1
  84. Using request_store 1.3.1
  85. Using ruby_dep 1.5.0
  86. Using lumberjack 1.0.10
  87. Using nenv 0.3.0
  88. Using shellany 0.0.1
  89. Using method_source 0.8.2
  90. Using slop 3.6.0
  91. Using guard-compat 1.2.1
  92. Using powerpack 0.1.1
  93. Using rainbow 2.1.0
  94. Using sysexits 1.2.0
  95. Using temple 0.7.7
  96. Using hashdiff 0.3.1
  97. Using hashie 3.4.6
  98. Using http-form_data 1.0.1
  99. Installing http_parser.rb 0.6.0 with native extensions
  100. Using http_accept_language 2.0.5
  101. Using httpclient 2.8.2.4
  102. Using jasmine-core 2.5.2
  103. Using phantomjs 2.1.1.0
  104. Using jasmine-jquery-rails 2.0.3
  105. Using securecompare 1.0.0
  106. Using url_safe_base64 0.2.2
  107. Using jwt 1.5.6
  108. Installing kgio 2.10.0 with native extensions
  109. Using leaflet-rails 0.7.7
  110. Using little-plugger 1.1.4
  111. Using systemu 2.6.5
  112. Using markerb 1.1.0
  113. Using mini_magick 4.5.1
  114. Using naught 1.1.0
  115. Using nested_form 0.3.2
  116. Using oauth 0.5.1
  117. Using websocket-extensions 0.1.2
  118. Installing rugged 0.24.0 with native extensions
  119. Using rack-cors 0.4.0
  120. Using rack-piwik 0.3.0
  121. Using rack-rewrite 1.5.1
  122. Using rails-assets-autosize 3.0.17
  123. Using rails-assets-blueimp-gallery 2.21.3
  124. Using rails-assets-jquery 2.2.4
  125. Using rails-assets-emojione 2.0.1
  126. Using rails-assets-favico.js 0.3.10
  127. Using rails-assets-jquery-fullscreen-plugin 0.5.0
  128. Using rails-assets-jquery.slimscroll 1.3.8
  129. Using rails-assets-highlightjs 9.7.0
  130. Using rails-assets-jasmine 2.5.2
  131. Using rails-assets-markdown-it 8.0.0
  132. Using rails-assets-markdown-it--markdown-it-for-inline 0.1.1
  133. Using rails-assets-markdown-it-diaspora-mention 1.0.0
  134. Using rails-assets-markdown-it-hashtag 0.4.0
  135. Using rails-assets-markdown-it-sanitizer 0.4.3
  136. Using rails-assets-markdown-it-sub 1.0.0
  137. Using rails-assets-markdown-it-sup 1.0.0
  138. Using rails-assets-perfect-scrollbar 0.6.12
  139. Using remotipart 1.3.1
  140. Installing raindrops 0.17.0 with native extensions
  141. Installing redcarpet 3.3.4 with native extensions
  142. Using redis 3.3.2
  143. Using ruby-oembed 0.10.1
  144. Using rubyzip 1.2.0
  145. Using useragent 0.16.8
  146. Using simple_oauth 0.3.1
  147. Using yard 0.9.5
  148. Using timecop 0.8.1
  149. Using turbo_dev_assets 0.0.2
  150. Using will_paginate 3.1.5
  151. Using fission 0.5.0
  152. Using i18n-inflector 2.6.7
  153. Using tzinfo 1.2.2
  154. Using memoizable 0.4.2
  155. Installing nokogiri 1.6.8.1 with native extensions
  156. Using rack-test 0.6.3
  157. Using warden 1.2.6
  158. Using rack-mobile-detect 0.4.0
  159. Using rack-protection 1.5.3
  160. Using rack-ssl 1.4.1
  161. Using mime-types 3.1
  162. Using json-schema 2.7.0
  163. Using fog-core 1.43.0
  164. Using jsonpath 0.5.8
  165. Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  166. current directory: /private/var/folders/nb/j6bftgxj0bd7zq5g98hn3xnc0000gn/T/bundler20161204-90063-19uje57unf_ext-0.0.7.2/gems/unf_ext-0.0.7.2/ext/unf_ext
  167. /Users/KrishnaTeja/.rbenv/versions/2.3.0/bin/ruby -r ./siteconf20161204-90063-15sm4gh.rb extconf.rb
  168. checking for main() in -lstdc++...***extconf.rb failed***
  169. Could not create Makefile due to some reason, probably lack of necessary
  170. libraries and/or headers. Check the mkmf.log file for more details. You may
  171. need configuration options.
  172. Provided configuration options:
  173. --with-opt-dir
  174. --without-opt-dir
  175. --with-opt-include
  176. --without-opt-include=${opt-dir}/include
  177. --with-opt-lib
  178. --without-opt-lib=${opt-dir}/lib
  179. --with-make-prog
  180. --without-make-prog
  181. --srcdir=.
  182. --curdir
  183. --ruby=/Users/KrishnaTeja/.rbenv/versions/2.3.0/bin/$(RUBY_BASE_NAME)
  184. --with-static-libstdc++
  185. --without-static-libstdc++
  186. --with-stdc++lib
  187. --without-stdc++lib
  188. /Users /KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
  189. You have to install development tools first.
  190. from
  191. /Users /KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
  192. from
  193. /Users /KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
  194. from
  195. /Users /KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
  196. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:997:in `block in have_library'
  197. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
  198. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
  199. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
  200. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
  201. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:320:in `open'
  202. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
  203. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
  204. from /Users/KrishnaTeja/.rbenv/versions/2.3.0/lib/ruby/2.3.0/mkmf.rb:992:in `have_library'
  205. from extconf.rb:6:in `<main>'
  206. To see why this extension failed to compile, please check the mkmf.log which can be found here:
  207. /var/folders/nb/j6bftgxj0bd7zq5g98hn3xnc0000gn/T/bundler20161204-90063-19uje57unf_ext-0.0.7.2/extensions/x86_64-darwin-15/2.3.0-static/unf_ext-0.0.7.2/mkmf.log
  208. extconf failed, exit code 1
  209. Gem files will remain installed in /var/folders/nb/j6bftgxj0bd7zq5g98hn3xnc0000gn/T/bundler20161204-90063-19uje57unf_ext-0.0.7.2/gems/unf_ext-0.0.7.2 for inspection.
  210. Results logged to /var/folders/nb/j6bftgxj0bd7zq5g98hn3xnc0000gn/T/bundler20161204-90063-19uje57unf_ext-0.0.7.2/extensions/x86_64-darwin-15/2.3.0-static/unf_ext-0.0.7.2/gem_make.out
  211. An error occurred while installing unf_ext (0.0.7.2), and Bundler cannot continue.
  212. Make sure that `gem install unf_ext -v '0.0.7.2'` succeeds before bundling.

我看了看其他类似的问题,但都没有帮助。任何帮助都将不胜感激。先谢谢你。

e5njpo68

e5njpo681#

我重新安装了Xcode,删除了Gemlock文件,更新了捆绑包,最后安装了捆绑包……一切都很顺利,应用程序也很顺利。

eoigrqb6

eoigrqb62#

试试这个:)
sudo apt-get install ruby-dev和继续bundle install

nuypyhwy

nuypyhwy3#

对于那些在安装Fastlane时遇到这个An error occurred while installing unf_ext问题的人来说,如果你的Ruby版本太旧,这种情况经常会发生。MacOS中的默认Ruby版本为2.6.x,您需要至少2.7.x才能使其正常工作。在这种情况下,我建议安装Ruby版本管理器(https://rvm.io/)并将ruby "2.7.6"行添加到Gemfile中。然后,Ruby版本管理器将强制您在安装gem时使用此版本的ruby,这个问题应该会消失。

ru9i0ody

ru9i0ody4#

您可以尝试以下操作:

  1. sudo apt-get install libgmp-dev

  1. sudo apt-get install libgmp3-dev

相关问题