gpt4 book ai didi

ruby-on-rails - 找不到 libxml2 的包配置

转载 作者:行者123 更新时间:2023-12-05 08:41:28 26 4
gpt4 key购买 nike

我在添加我的 Gemfile 后进行了捆绑安装:

gem 'pg',  '0.20.0'
gem 'fog', '1.42'
gem 'rails_serve_static_assets'
gem 'rails_stdout_logging'

但 Bundler 在安装 ovirt-engine-sdk (4.2.3) 时出错后无法继续。日志说:

find_executable: checking for xml2-config... -------------------- no --------------------
package configuration for libxml2 is not found

我在 Windows 10 上,完全迷失了我在这里找到的说明 https://github.com/GNOME/libxml2/tree/master/win32

出于某种原因需要这个库,但不是上面列出的 4 个 gem。无论如何我需要它!

这是我的 Gemfile:

    source 'https://rubygems.org'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end


gem 'rails', '~> 5.1.5'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'devise', '~> 4.4', '>= 4.4.1'
gem 'activeadmin', '~> 1.2', '>= 1.2.1'
gem 'inherited_resources'
gem 'active_skin'
gem 'paperclip', '~> 6.0.0'
gem 'cancancan'


group :development, :test do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end

group :production do
gem 'pg', '0.20.0'
gem 'fog', '1.42'
gem 'rails_serve_static_assets' # for Static Assets on Heroku
gem 'rails_stdout_logging' # needed with the above one
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

最佳答案

我在新的 ubuntu 18.04 上遇到了完全相同的问题,安装了一个 rails 项目。

报告了类似的问题here

所以我的解决方法是

sudo apt-get install libxml2-dev

然后我用 libcurl 得到了一个类似的问题并修复了它

sudo apt-get install libcurl4-openssl-dev

然后我遇到了 pg 的问题并修复了它

sudo apt-get install libpq-dev 来自 here

关于ruby-on-rails - 找不到 libxml2 的包配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49674564/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com