dpkg-scanpackages -a amd64 . > Packages - Wrote 0 entries with --arch arm64 - apt

I am trying to pack(and create a repo on github) using the following, but dpkg-scanpackages is not writing anything when using --arch arm64?
control file:
Package: hello-world
Version: 0.0.1
Maintainer: example <example#example.com>
Depends: git
Architecture: arm64
Homepage: http://example.com
Description: A program that prints hello
Created .deb file and verified with dpkg-deb --contents ./arm64
dpkg-deb -b ./arm64
Wrote 1 entries:
dpkg-scanpackages --multiversion . > Packages
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
Problem
Wrote 0 entries with --arch arm64:
dpkg-scanpackages --arch amd64 . > Packages
dpkg-scanpackages: info: Wrote 0 entries to output Packages file.

I had the same problem. Solution form Chris G. works for me: make sure that name of your .deb file contains the architecture like this:
XnViewMP-linux-64_amd64.deb
After this, dpkg-scanpackages work me as expected:
gabor#focal-autoinstall:/var/www/html/repo$ ll pool/main/
total 53664
drwxrwxr-x 2 gabor gabor 4096 May 21 14:54 ./
drwxrwxr-x 3 gabor gabor 4096 May 21 14:46 ../
-rw-rw-r-- 1 gabor gabor 54943400 May 3 13:25 XnViewMP-linux-64_amd64.deb
gabor#focal-autoinstall:/var/www/html/repo$ dpkg-scanpackages --arch amd64 pool/
Package: xnview
Version: 1.00.0
Architecture: amd64
Maintainer: None <none#none.com>
Installed-Size: 16
Depends: libasound2 (>= 1.0.16), libatk1.0-0 (>= 1.12.4), libbz2-1.0, libc6 (>= 2.17), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.9.14), libdrm2 (>= 2.4.30), libegl1-mesa | libegl1, libfontconfig1 (>= 2.11), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:3.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.33.14), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), libgtk-3-0 (>= 3.5.18), libopenal1 (>= 1.14), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpulse-mainloop-glib0 (>= 0.99.1), libpulse0 (>= 0.99.4), libsqlite3-0 (>= 3.5.9), libstdc++6 (>= 5), libx11-6 (>= 2:1.4.99.1), libx11-xcb1, libxcb-shm0, libxcb1 (>= 1.8), libxcb-xinerama0, libxext6, libxfixes3, libxi6 (>= 2:1.5.99.2), libxv1, zlib1g (>= 1:1.2.3.4), libopenal1
Filename: pool/main/XnViewMP-linux-64_amd64.deb
Size: 54943400
MD5sum: cf5aea700b14b50fe657c406f6f84894
SHA1: a27d7a0d17dc11825666c9175b974f51f5e7d69f
SHA256: 6f409eb6d890a827bd382b38a8a9e89eacbad6eb2b5edba01265bd20f2ed3655
Section: graphics
Priority: optional
Homepage: http://www.xnview.com
Description: Graphic viewer, browser, converter.
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
gabor#focal-autoinstall:/var/www/html/repo$

Probably foo/ is missing, so try this:
dpkg-scanpackages --arch arm64 pool/ > dists/stable/main/binary-amd64/Packages

Related

Why running homestead after vagrant/VirtualBox installtion I have version errors?

I try to run homestead, but I have an error :
$ cd ~/Homestead
hoster#hoster-os:~/Homestead$ vagrant up --provision
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Box 'laravel/homestead' could not be found. Attempting to find and install...
homestead: Box Provider: virtualbox
homestead: Box Version: >= 13.0.0, < 14.0.0
==> homestead: Loading metadata for box 'laravel/homestead'
homestead: URL: https://vagrantcloud.com/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.
Box: laravel/homestead
Address: https://vagrantcloud.com/laravel/homestead
Constraints: >= 13.0.0, < 14.0.0
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1, 11.0.0, 11.1.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, 13.0.0
In my system I have :
hoster#hoster-os:~/Homestead$ uname -a
Linux hoster-os 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
hoster#hoster-os:~/Homestead$ lsb_release -d; uname -r; uname -i
Description: Ubuntu 20.04.5 LTS
5.15.0-53-generic
x86_64
hoster#hoster-os:~/Homestead$ dpkg -s virtualbox
Package: virtualbox
Status: install ok installed
Priority: optional
Section: contrib/misc
Installed-Size: 109341
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Architecture: amd64
Version: 6.1.38-dfsg-3~ubuntu1.20.04.1
Depends: adduser, iproute2, procps, virtualbox-dkms (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-modules, python3 (<< 3.9), python3 (>= 3.8~), python3.8, python3:any, libc6 (>= 2.29), libcurl3-gnutls (>= 7.16.2), libdevmapper1.02.1 (>= 2:1.02.97), libgcc-s1 (>= 3.0), libgl1, libgsoap-2.8.91, liblzf1 (>= 1.5), libopus0 (>= 1.1), libpng16-16 (>= 1.6.2-1), libpython3.8 (>= 3.8.2), libsdl1.2debian (>= 1.2.11), libssl1.1 (>= 1.1.1), libstdc++6 (>= 5.2), libvncserver1 (>= 0.9.10), libvpx6 (>= 1.6.0), libx11-6, libxcursor1 (>> 1.1.2), libxml2 (>= 2.7.4), libxt6, zlib1g (>= 1:1.1.4)
Recommends: virtualbox-qt (= 6.1.38-dfsg-3~ubuntu1.20.04.1), libqt5core5a (>= 5.12.2), libqt5gui5 (>= 5.0.2) | libqt5gui5-gles (>= 5.0.2), libqt5opengl5 (>= 5.0.2), libqt5widgets5 (>= 5.0.2), libxcb1, libxext6
Suggests: vde2, virtualbox-guest-additions-iso
Conflicts: virtualbox-2.0, virtualbox-2.1, virtualbox-2.2, virtualbox-3.0, virtualbox-3.1, virtualbox-3.2, virtualbox-4.0, virtualbox-4.1, virtualbox-4.2, virtualbox-4.3, virtualbox-5.0, virtualbox-5.1, virtualbox-5.2, virtualbox-6.0, virtualbox-6.1
Conffiles:
/etc/default/virtualbox 903beafa3922607d1ac07950d9ae2d50
/etc/init.d/virtualbox 651dc62d725baa7d040004ff22a7e433
Description: x86 virtualization solution - base binaries
VirtualBox is a free x86 virtualization solution allowing a wide range
of x86 operating systems such as Windows, DOS, BSD or Linux to run on a
Linux system.
.
This package provides the binaries for VirtualBox. Either the virtualbox-dkms
or the virtualbox-source package is also required in order to compile the
kernel modules needed for virtualbox. A graphical user interface for
VirtualBox is provided by the package virtualbox-qt.
Original-Maintainer: Debian Virtualbox Team <team+debian-virtualbox#tracker.debian.org>
Homepage: https://www.virtualbox.org
hoster#hoster-os:~/Homestead$ dpkg -s vagrant
Package: vagrant
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 3104
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Architecture: all
Version: 2.2.6+dfsg-2ubuntu3
Depends: libarchive-tools, curl, openssh-client, rsync, ruby, ruby-bcrypt-pbkdf (>= 1.0.0), ruby-childprocess (>= 0.6.0), ruby-ed25519 (>= 1.2.4), ruby-erubis (>= 2.7.0), ruby-i18n (>= 1.1.1), ruby-listen (>= 3.1.5), ruby-log4r (>= 1.1.9), ruby-net-scp (>= 1.2.0), ruby-net-sftp (>= 2.1), ruby-net-ssh (>= 5.1.0), ruby-rest-client (>= 1.6.0), ruby-vagrant-cloud (>= 2.0.3), ruby-zip (>= 1.2.2)
Recommends: vagrant-libvirt
Suggests: virtualbox (>= 4.0)
Breaks: virtualbox (>= 6.2)
Description: Tool for building and distributing virtualized development environments
This package provides the tools to create and configure lightweight,
reproducible, and portable virtual environments.
.
Vagrant uses Oracle’s VirtualBox to create its virtual machines and then
uses Chef or Puppet to provision them.
Homepage: https://www.vagrantup.com
Original-Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers#lists.alioth.debian.org>
Ruby-Versions: all
hoster#hoster-os:~/Homestead$ dpkg -s virtualbox
Package: virtualbox
Status: install ok installed
Priority: optional
Section: contrib/misc
Installed-Size: 109341
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Architecture: amd64
Version: 6.1.38-dfsg-3~ubuntu1.20.04.1
Depends: adduser, iproute2, procps, virtualbox-dkms (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.38-dfsg-3~ubuntu1.20.04.1) | virtualbox-modules, python3 (<< 3.9), python3 (>= 3.8~), python3.8, python3:any, libc6 (>= 2.29), libcurl3-gnutls (>= 7.16.2), libdevmapper1.02.1 (>= 2:1.02.97), libgcc-s1 (>= 3.0), libgl1, libgsoap-2.8.91, liblzf1 (>= 1.5), libopus0 (>= 1.1), libpng16-16 (>= 1.6.2-1), libpython3.8 (>= 3.8.2), libsdl1.2debian (>= 1.2.11), libssl1.1 (>= 1.1.1), libstdc++6 (>= 5.2), libvncserver1 (>= 0.9.10), libvpx6 (>= 1.6.0), libx11-6, libxcursor1 (>> 1.1.2), libxml2 (>= 2.7.4), libxt6, zlib1g (>= 1:1.1.4)
Recommends: virtualbox-qt (= 6.1.38-dfsg-3~ubuntu1.20.04.1), libqt5core5a (>= 5.12.2), libqt5gui5 (>= 5.0.2) | libqt5gui5-gles (>= 5.0.2), libqt5opengl5 (>= 5.0.2), libqt5widgets5 (>= 5.0.2), libxcb1, libxext6
Suggests: vde2, virtualbox-guest-additions-iso
Conflicts: virtualbox-2.0, virtualbox-2.1, virtualbox-2.2, virtualbox-3.0, virtualbox-3.1, virtualbox-3.2, virtualbox-4.0, virtualbox-4.1, virtualbox-4.2, virtualbox-4.3, virtualbox-5.0, virtualbox-5.1, virtualbox-5.2, virtualbox-6.0, virtualbox-6.1
Conffiles:
/etc/default/virtualbox 903beafa3922607d1ac07950d9ae2d50
/etc/init.d/virtualbox 651dc62d725baa7d040004ff22a7e433
Description: x86 virtualization solution - base binaries
VirtualBox is a free x86 virtualization solution allowing a wide range
of x86 operating systems such as Windows, DOS, BSD or Linux to run on a
Linux system.
.
This package provides the binaries for VirtualBox. Either the virtualbox-dkms
or the virtualbox-source package is also required in order to compile the
kernel modules needed for virtualbox. A graphical user interface for
VirtualBox is provided by the package virtualbox-qt.
Original-Maintainer: Debian Virtualbox Team <team+debian-virtualbox#tracker.debian.org>
Homepage: https://www.virtualbox.org
hoster#hoster-os:~/Homestead$ dpkg -s vagrant
Package: vagrant
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 3104
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Architecture: all
Version: 2.2.6+dfsg-2ubuntu3
Depends: libarchive-tools, curl, openssh-client, rsync, ruby, ruby-bcrypt-pbkdf (>= 1.0.0), ruby-childprocess (>= 0.6.0), ruby-ed25519 (>= 1.2.4), ruby-erubis (>= 2.7.0), ruby-i18n (>= 1.1.1), ruby-listen (>= 3.1.5), ruby-log4r (>= 1.1.9), ruby-net-scp (>= 1.2.0), ruby-net-sftp (>= 2.1), ruby-net-ssh (>= 5.1.0), ruby-rest-client (>= 1.6.0), ruby-vagrant-cloud (>= 2.0.3), ruby-zip (>= 1.2.2)
Recommends: vagrant-libvirt
Suggests: virtualbox (>= 4.0)
Breaks: virtualbox (>= 6.2)
Description: Tool for building and distributing virtualized development environments
This package provides the tools to create and configure lightweight,
reproducible, and portable virtual environments.
.
Vagrant uses Oracle’s VirtualBox to create its virtual machines and then
uses Chef or Puppet to provision them.
Homepage: https://www.vagrantup.com
Original-Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers#lists.alioth.debian.org>
Ruby-Versions: all
How that can be fixed?
Thanks in advance!
I faced the same problem and here is what worked for me:
Download an older version. This can be done on the official page on github (https://github.com/laravel/homestead.git), then go to tags, select a version and download the zip archive with files.

Using a Docker image to run bundle install ignores bundle config setting

I'm hoping to use a Docker image (ruby:3.0) build an image without (eventually) having to have Ruby installed locally.
For testing purposes, I have Ruby 2.7.0 installed in Windows 10 WSL2 environment:
$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
I have a Gemfile:
source 'https://rubygems.org'
gem 'sinatra'
group :development, :test do
gem 'thin'
gem 'sqlite3'
end
And bundler set to install Gems in the project's directory:
$ cat .bundle/config
---
BUNDLE_PATH: "vendor/bundle"
If I run bundle install locally:
$ bundle install
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies...
Using bundler 2.2.17
Fetching rack 2.2.3
Fetching tilt 2.0.10
Fetching daemons 1.4.1
Fetching sqlite3 1.4.2
Fetching eventmachine 1.2.7
Fetching ruby2_keywords 0.0.5
Installing rack 2.2.3
Installing tilt 2.0.10
Installing sqlite3 1.4.2 with native extensions
Installing ruby2_keywords 0.0.5
Installing daemons 1.4.1
Installing eventmachine 1.2.7 with native extensions
Fetching mustermann 1.1.1
Installing mustermann 1.1.1
Fetching rack-protection 2.1.0
Installing rack-protection 2.1.0
Fetching sinatra 2.1.0
Installing sinatra 2.1.0
Fetching thin 1.8.1
Installing thin 1.8.1 with native extensions
Bundle complete! 3 Gemfile dependencies, 11 gems now installed.
Bundled gems are installed into `./vendor/bundle`
the Gems are installed to the ./vendor/bundle directory:
confirmed:
$ bundle info thin
* thin (1.8.1)
Summary: A thin and fast web server
Homepage: https://github.com/macournoyer/thin
Source Code: https://github.com/macournoyer/thin
Changelog: https://github.com/macournoyer/thin/blob/master/CHANGELOG
Path: /home/craig/ruby/dev/vendor/bundle/ruby/2.7.0/gems/thin-1.8.1
Next, I use the ruby:3.0 image to bundle the Gems in the project's directory.
I removed the Gemfile.lock and ./vendor/bundle directory, then ran bundle install using the image:
$ docker run --rm -v "$(pwd)":/src -w /src ruby:3.0 bundle install
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies...
Using bundler 2.2.32
Fetching sqlite3 1.4.2
Fetching eventmachine 1.2.7
Fetching rack 2.2.3
Fetching tilt 2.0.10
Fetching ruby2_keywords 0.0.5
Fetching daemons 1.4.1
Installing ruby2_keywords 0.0.5
Installing tilt 2.0.10
Installing daemons 1.4.1
Installing sqlite3 1.4.2 with native extensions
Installing rack 2.2.3
Fetching mustermann 1.1.1
Installing eventmachine 1.2.7 with native extensions
Installing mustermann 1.1.1
Fetching rack-protection 2.1.0
Installing rack-protection 2.1.0
Fetching sinatra 2.1.0
Installing sinatra 2.1.0
Fetching thin 1.8.1
Installing thin 1.8.1 with native extensions
Bundle complete! 3 Gemfile dependencies, 11 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
This process seemed to install the Gems, but not to ./vendor/bundle. Trying to identify the location generates an error:
$ bundle info thin
Could not find daemons-1.4.1 in any of the sources
It would appear that .bundle/config is being ignored. I'm guessing that the Gems are actually being installed into the container that is created to run bundle install.
Is there a way to get this to use .bundle/config?
this happens due to few things:
gem installation directory, which is configured in bundler's configuration that is packed with the image
BUNDLE_APP_CONFIG environment variable defined in the docker image
looking at bundler documentation, we have to note few things:
list of available keys, BUNDLE_PATH is not there, but path is...
The location to install the specified gems to.
executing config
Executing bundle config set --local <name> <value> will set that configuration in the directory for the local application. The configuration will be stored in <project_root>/.bundle/config. If BUNDLE_APP_CONFIG is set, the configuration will be stored in $BUNDLE_APP_CONFIG/config
Bundler loads configuration settings in this order
Local config (<project_root>/.bundle/config ...)
let's give it try...
$ docker run --rm -it -v $PWD:/src --workdir /src --entrypoint /bin/sh ruby:alpine
/src # ls -l
total 0
/src # echo $BUNDLE_APP_CONFIG
/usr/local/bundle
/src # export BUNDLE_APP_CONFIG=$PWD/.bundler
$ bundle config set --local path 'vendor/bundle'
/src # ls -la
total 4
drwxr-xr-x 3 root root 96 Dec 16 21:10 .
drwxr-xr-x 1 root root 4096 Dec 16 21:10 ..
drwxr-xr-x 3 root root 96 Dec 16 21:10 .bundler
/src # bundle config
Settings are listed in order of priority. The top value will be used.
app_config
Set via BUNDLE_APP_CONFIG: "/src/.bundler"
path
Set for your local app (/src/.bundler/config): "vendor/bundle"
silence_root_warning
Set via BUNDLE_SILENCE_ROOT_WARNING: true
/src # bundle init
Writing new Gemfile to /src/Gemfile
/src # echo 'gem "sinatra"' >> Gemfile
/src # bundle install --quiet
/src # ls -l
total 8
-rw-r--r-- 1 root root 161 Dec 16 21:12 Gemfile
-rw-r--r-- 1 root root 398 Dec 16 21:13 Gemfile.lock
drwxr-xr-x 3 root root 96 Dec 16 21:18 vendor
/src # du -sh vendor/bundle/
3.1M vendor/bundle/
/src # bundle exec rackup --version
Rack 1.3 (Release: 2.2.3)
/src # exit
$ ls -ax1
.
..
.bundler
Gemfile
Gemfile.lock
vendor
as you can see:
bundler's configuration is stored in your local directory
bundler installed the gems into your local directory

Cant install capybara webkit on Mac

been trying to bundle using
QT_SELECT=5 bundle install
but keep running into this error
ridgedon#Ridges-MacBook-Pro webkit-server % QT_SELECT=5 bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.1
Using CFPropertyList 2.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.6
Using activesupport 4.2.4
Using builder 3.2.4
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.7
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.6
Using loofah 2.4.0
Using rails-html-sanitizer 1.3.0
Using actionview 4.2.4
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.4
Using globalid 0.3.6
Using activejob 4.2.4
Using mime-types 2.99.3
Using mail 2.6.3
Using actionmailer 4.2.4
Using activemodel 4.2.4
Using arel 6.0.4
Using activerecord 4.2.4
Using acts-as-taggable-on 3.5.0
Using acts_as_list 0.9.0
Using addressable 2.4.0
Using excon 0.45.4
Using formatador 0.2.5
Using fog-core 1.37.0
Using multi_json 1.11.2
Using fog-json 1.0.2
Using ipaddress 0.8.0
Using xml-simple 1.1.5
Using fog-aliyun 0.1.0
Using fog-xml 0.1.3
Using fog-atmos 0.1.0
Using fog-aws 0.7.6
Using inflecto 0.0.2
Using fog-brightbox 0.9.0
Using fog-dynect 0.0.2
Using fog-ecloud 0.3.0
Using fog-google 0.1.0
Using fog-local 0.2.1
Using fog-powerdns 0.1.1
Using fog-profitbricks 0.0.5
Using fog-radosgw 0.0.4
Using fog-riakcs 0.1.0
Using fog-sakuracloud 1.4.0
Using fog-serverlove 0.1.2
Using fog-softlayer 1.0.2
Using fog-storm_on_demand 0.1.1
Using fog-terremark 0.1.0
Using fission 0.5.0
Using fog-vmfusion 0.1.0
Using fog-voxel 0.1.0
Using fog-xenserver 0.2.2
Using fog 1.36.0
Using thor 0.20.3
Using railties 4.2.4
Using javascript_dlog-rails 1.0.1
Using sass 3.4.19
Using jquery-fileupload-rails 0.4.6
Using simple_form 3.2.0
Using anaconda 2.0.2
Using execjs 2.6.0
Using autoprefixer-rails 6.0.3
Using aws-eventstream 1.0.2
Using aws-sigv4 1.1.0
Using jmespath 1.4.0
Using aws-sdk-core 2.11.257
Using aws-sdk-resources 2.11.257
Using aws-sdk 2.11.257
Using bcrypt 3.1.13
Using coderay 1.1.1
Using better_errors 2.1.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bootstrap-datepicker-rails 1.4.0
Using kaminari 0.16.3
Using bundler 1.17.3
Using sprockets 3.4.0
Using sprockets-rails 2.3.3
Using rails 4.2.4
Using bootstrap-kaminari-views 0.0.5
Using bootstrap-sass 3.3.5.1
Using mimemagic 0.3.3
Using carrierwave 0.11.2
Using mini_magick 4.10.1
Using remotipart 1.4.2
Using bootsy 2.1.0
Using bugsnag 6.8.0
Using uniform_notifier 1.10.0
Using bullet 5.6.1
Using byebug 6.0.2
Using colorize 0.7.7
Using net-ssh 3.0.1
Using net-scp 1.2.1
Using sshkit 1.7.1
Using capistrano 3.4.0
Using capistrano-bundler 1.1.4
Using capistrano-rails 1.1.3
Using xpath 2.1.0
Using capybara 2.5.0
Using launchy 2.4.3
Using capybara-screenshot 1.0.17
Fetching capybara-webkit 1.7.1
Installing capybara-webkit 1.7.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
/Users/ridgedon/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/ridgedon/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r
./siteconf20201008-48198-i94z8h.rb extconf.rb
Info: creating stash file /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/.qmake.stash
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
Command 'make' failed
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR=" clean
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server clean
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-clean-ordered] Error 3
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR="
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
make failed, exit code 2
Gem files will remain installed in /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1 for inspection.
Results logged to /Users/ridgedon/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-20/2.6.0/capybara-webkit-1.7.1/gem_make.out
An error occurred while installing capybara-webkit (1.7.1), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.7.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
capybara-webkit
and whenever I run
gem install capybara-webkit -v '1.7.1' --source 'https://rubygems.org/'
I get
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
/Users/ridgedon/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/ridgedon/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20201008-48386-1xgbddp.rb extconf.rb
Info: creating stash file /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/.qmake.stash
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
Command 'make' failed
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR=" clean
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server clean
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-clean-ordered] Error 3
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR="
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
make failed, exit code 2
Gem files will remain installed in /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1 for inspection.
Results logged to /Users/ridgedon/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-20/2.6.0/capybara-webkit-1.7.1/gem_make.out
How can I fix this on Mac?
capybara-webkit has gone EOL - It's not worth using anymore (replicates a really old browser). Use Capybara with the Selenium driver and a headless browser, or with one of the direct to CDP drivers.

Can't install nokogiri with bundle when build docker container in archlinux

Never was, and here again.
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
Bundler version 1.16.2
Archlinux updated 4.17.4-1 x86_64
Pure ruby project
I can install nokogiri with gem install nokogiri --no-rdoc --no-ri
When I run bundle install --path=vendor inside my ruby project I need to add options to bundler before -- bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2 for that installing have success. Without those options he can't.
It fails when I run Dockefile. I need hints where to look more.
FROM archlinux/base
ENV HOME="/srv"
ENV LANG=ru_RU.UTF-8
ENV APP_ENV=production
ENV LANG=ru_RU.UTF-8
ENV PATH=$HOME/sbin:$HOME/bin:$HOME/.gem/ruby/2.5.0/bin:/usr/lib/ruby/gems/2.5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
RUN pacman -Syu --noconfirm pkgconf procps-ng iproute2 iputils supervisor ruby make gcc grep postgresql-libs awk && \
gem install bundler --no-ri --no-rdoc --no-document --no-user-install && \
pacman -Scc --noconfirm
COPY ./ /srv/
RUN cd /srv && rm -rf vendor && \
bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xslt-include=/usr/include/libxslt --with-exslt-include=/usr/include/libexslt --with-xml2-lib=/usr/lib/libxml2.so && \
bundle install --path=vendor --jobs=4 --binstubs
...
$ docker build -t mprj:1.2.0 -f ./info/Dockerfile .
Sending build context to Docker daemon 2.931MB
Step 1/12 : FROM archlinux/base
---> 4702f86ec64f
Step 2/12 : ENV HOME="/srv"
---> Using cache
---> 25d2416a2261
Step 3/12 : ENV LANG=ru_RU.UTF-8
---> Using cache
---> a5f2bb965b81
Step 4/12 : ENV APP_ENV=production
---> Using cache
---> 0ea44026fe0a
Step 5/12 : ENV PATH=$HOME/sbin:$HOME/bin:$HOME/.gem/ruby/2.5.0/bin:/usr/lib/ruby/gems/2.5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
---> Running in e4fecc392bb2
Removing intermediate container e4fecc392bb2
---> d26d4a07b769
Step 6/12 : RUN pacman -Syu --noconfirm pkgconf procps-ng iproute2 iputils supervisor ruby make gcc grep postgresql-libs awk && gem install bundler --no-ri --no-rdoc --no-document --no-user-install && pacman -Scc --noconfirm
---> Running in b18a1c4585ee
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: rubygems will be installed before its ruby dependency
Packages (36) binutils-2.30-5 gc-7.6.6-1 gdbm-1.16-1 guile-2.2.4-1 libatomic_ops-7.6.4-1 libmpc-1.1.0-1 libnsl-1.2.0-1 libsasl-2.1.26-13 libsystemd-239.0-2 libtool-2.4.6+40+g6ca5e224-7 libyaml-0.1.7-1 mpfr-4.0.1-1 perl-5.26.2-2 python2-2.7.15-2 python2-appdirs-1.4.3-1 python2-meld3-1.0.2-1 python2-packaging-17.1-1 python2-pyparsing-2.2.0-1 python2-setuptools-1:39.2.0-2 python2-six-1.11.0-1 rubygems-2.7.7-1 sysfsutils-2.1.0-10 systemd-239.0-2 tar-1.30-1 texinfo-6.5-1 gawk-4.2.1-1 gcc-8.1.1+20180531-1 grep-3.1-1 iproute2-4.17.0-1 iputils-20161105.1f2bb12-2 make-4.2.1-2 pkgconf-1.5.1-1 postgresql-libs-10.4-3 procps-ng-3.3.15-1 ruby-2.5.1-2 supervisor-3.3.4-1
Total Download Size: 83.64 MiB
Total Installed Size: 401.21 MiB
Net Upgrade Size: 327.94 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading pkgconf-1.5.1-1-x86_64.pkg.tar.xz...
downloading libsystemd-239.0-2-x86_64.pkg.tar.xz...
downloading procps-ng-3.3.15-1-x86_64.pkg.tar.xz...
downloading iproute2-4.17.0-1-x86_64.pkg.tar.xz...
downloading sysfsutils-2.1.0-10-x86_64.pkg.tar.xz...
downloading gdbm-1.16-1-x86_64.pkg.tar.xz...
downloading perl-5.26.2-2-x86_64.pkg.tar.xz...
downloading iputils-20161105.1f2bb12-2-x86_64.pkg.tar.xz...
downloading libsasl-2.1.26-13-x86_64.pkg.tar.xz...
downloading libnsl-1.2.0-1-x86_64.pkg.tar.xz...
downloading tar-1.30-1-x86_64.pkg.tar.xz...
downloading libtool-2.4.6+40+g6ca5e224-7-x86_64.pkg.tar.xz...
downloading texinfo-6.5-1-x86_64.pkg.tar.xz...
downloading make-4.2.1-2-x86_64.pkg.tar.xz...
downloading binutils-2.30-5-x86_64.pkg.tar.xz...
downloading mpfr-4.0.1-1-x86_64.pkg.tar.xz...
downloading libmpc-1.1.0-1-x86_64.pkg.tar.xz...
downloading gcc-8.1.1+20180531-1-x86_64.pkg.tar.xz...
downloading grep-3.1-1-x86_64.pkg.tar.xz...
downloading gawk-4.2.1-1-x86_64.pkg.tar.xz...
downloading systemd-239.0-2-x86_64.pkg.tar.xz...
downloading python2-2.7.15-2-x86_64.pkg.tar.xz...
downloading python2-appdirs-1.4.3-1-any.pkg.tar.xz...
downloading python2-pyparsing-2.2.0-1-any.pkg.tar.xz...
downloading python2-six-1.11.0-1-any.pkg.tar.xz...
downloading python2-packaging-17.1-1-any.pkg.tar.xz...
downloading python2-setuptools-1:39.2.0-2-any.pkg.tar.xz...
downloading libyaml-0.1.7-1-x86_64.pkg.tar.xz...
downloading rubygems-2.7.7-1-any.pkg.tar.xz...
downloading ruby-2.5.1-2-x86_64.pkg.tar.xz...
downloading libatomic_ops-7.6.4-1-x86_64.pkg.tar.xz...
downloading gc-7.6.6-1-x86_64.pkg.tar.xz...
downloading guile-2.2.4-1-x86_64.pkg.tar.xz...
downloading postgresql-libs-10.4-3-x86_64.pkg.tar.xz...
downloading python2-meld3-1.0.2-1-any.pkg.tar.xz...
downloading supervisor-3.3.4-1-any.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing pkgconf...
upgrading libsystemd...
installing procps-ng...
installing iproute2...
Optional dependencies for iproute2
linux-atm: ATM support
installing sysfsutils...
upgrading gdbm...
upgrading perl...
installing iputils...
Optional dependencies for iputils
xinetd: for tftpd
upgrading libsasl...
installing libnsl...
installing python2...
Optional dependencies for python2
tk: for IDLE
python2-setuptools [pending]
python2-pip
installing python2-meld3...
installing python2-appdirs...
installing python2-pyparsing...
installing python2-six...
installing python2-packaging...
installing python2-setuptools...
installing supervisor...
installing libyaml...
installing rubygems...
installing ruby...
Optional dependencies for ruby
ruby-docs: Ruby documentation
tk: for Ruby/TK
installing tar...
installing libtool...
installing texinfo...
installing libatomic_ops...
installing gc...
installing guile...
installing make...
installing binutils...
installing mpfr...
installing libmpc...
installing gcc...
Optional dependencies for gcc
lib32-gcc-libs: for generating code for 32-bit ABI
installing grep...
installing postgresql-libs...
installing gawk...
upgrading systemd...
:: Running post-transaction hooks...
( 1/11) Warn about old perl modules
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "ru_RU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
( 2/11) Cleaning up package cache...
( 3/11) Updating journal message catalog...
( 4/11) Reloading system manager configuration...
Skipped: Current root is not booted.
( 5/11) Updating udev hardware database...
( 6/11) Applying kernel sysctl settings...
Skipped: Current root is not booted.
( 7/11) Creating system user accounts...
( 8/11) Creating temporary files...
[/usr/lib/tmpfiles.d/journal-nocow.conf:26] Failed to resolve specifier: uninitialized /etc detected, skipping
All rules containing unresolvable specifiers will be skipped.
( 9/11) Reloading device manager configuration...
Skipped: Device manager is not running.
(10/11) Arming ConditionNeedsUpdate...
(11/11) Updating the info directory file...
Successfully installed bundler-1.16.2
1 gem installed
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
Removing intermediate container b18a1c4585ee
---> f6937487ce2c
Step 7/12 : COPY ./ /srv/
---> 6bb96498a4b5
Step 8/12 : RUN cd /srv && rm -rf vendor && bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xslt-include=/usr/include/libxslt --with-exslt-include=/usr/include/libexslt --with-xml2-lib=/usr/lib/libxml2.so && bundle install --path=vendor --jobs=1 --binstubs
---> Running in 187980e45717
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/.........
Fetching rake 12.3.1
Installing rake 12.3.1
Fetching public_suffix 3.0.2
Installing public_suffix 3.0.2
Fetching addressable 2.5.2
Installing addressable 2.5.2
Fetching amq-protocol 2.3.0
Installing amq-protocol 2.3.0
Fetching builder 3.2.3
Installing builder 3.2.3
Using bundler 1.16.2
Fetching bunny 2.11.0
Installing bunny 2.11.0
Fetching byebug 10.0.2
Installing byebug 10.0.2 with native extensions
Fetching coderay 1.1.2
Installing coderay 1.1.2
Fetching colored 1.2
Installing colored 1.2
Fetching command_line_reporter 4.0.0
Installing command_line_reporter 4.0.0
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching connection_pool 2.2.2
Installing connection_pool 2.2.2
Fetching safe_yaml 1.0.4
Installing safe_yaml 1.0.4
Fetching crack 0.4.3
Installing crack 0.4.3
Fetching daemons 1.2.6
Installing daemons 1.2.6
Fetching diff-lcs 1.3
Installing diff-lcs 1.3
Fetching dotenv 2.5.0
Installing dotenv 2.5.0
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching faraday 0.15.2
Installing faraday 0.15.2
Fetching ffi 1.9.25
Installing ffi 1.9.25 with native extensions
Fetching gyoku 1.3.1
Installing gyoku 1.3.1
Fetching hashdiff 0.3.7
Installing hashdiff 0.3.7
Fetching hashie 3.5.7
Installing hashie 3.5.7
Fetching jwt 2.1.0
Installing jwt 2.1.0
Fetching memory_profiler 0.9.10
Installing memory_profiler 0.9.10
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching mustermann 1.0.2
Installing mustermann 1.0.2
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /srv/vendor/ruby/2.5.0/gems/nokogiri-1.8.4/ext/nokogiri
/usr/bin/ruby -r ./siteconf20180709-1-199bolx.rb extconf.rb
--use-system-libraries --with-xml2-include=/usr/include/libxml2
--with-xslt-include=/usr/include/libxslt
--with-exslt-include=/usr/include/libexslt --with-xml2-lib=/usr/lib/libxml2.so
checking if the C compiler accepts ... yes
Building nokogiri using system libraries.
ERROR: cannot discover where libxml2 is located on your system. please make sure
`pkg-config` is installed.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include=${xml2-dir}/include
--with-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-exslt-dir
--without-exslt-dir
--with-exslt-include=${exslt-dir}/include
--with-exslt-lib
--without-exslt-lib=${exslt-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/srv/vendor/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /srv/vendor/ruby/2.5.0/gems/nokogiri-1.8.4
for inspection.
Results logged to
/srv/vendor/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.4/gem_make.out
An error occurred while installing nokogiri (1.8.4), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.8.4' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
nokogiri
The command '/bin/sh -c cd /srv && rm -rf vendor && bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xslt-include=/usr/include/libxslt --with-exslt-include=/usr/include/libexslt --with-xml2-lib=/usr/lib/libxml2.so && bundle install --path=vendor --jobs=1 --binstubs' returned a non-zero code: 5
Here is a Dockerfile based on your example which have installed nokogiri from Gemfile.
Dockerfile:
FROM archlinux/base
ENV HOME="/srv"
ENV LANG=ru_RU.UTF-8
ENV APP_ENV=production
ENV LANG=ru_RU.UTF-8
ENV PATH=$HOME/sbin:$HOME/bin:$HOME/.gem/ruby/2.5.0/bin:/usr/lib/ruby/gems/2.5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
RUN pacman -Syu --noconfirm libxml2 libxslt pkg-config pkgconf procps-ng iproute2 iputils supervisor ruby make gcc grep postgresql-libs awk && \
gem install bundler --no-ri --no-rdoc --no-document --no-user-install && \
pacman -Scc --noconfirm
COPY Gemfile /srv/
RUN cd /srv && rm -rf vendor && bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xslt-include=/usr/include/libxslt && bundle install --path=vendor --jobs=4 --binstubs
Gemfile
source 'https://rubygems.org'
gem 'nokogiri'
Feel free to use it.
So, I decided to start from scratch and removed all options from bundler rm -f $HOME/.bundle/config. Then I started to build docker over and recevied the next message from nokogiri team, where the hint was found: Failed to complete patch task; patch(1) or git(1) is required.
So adding patch and git to pacman options was fired the goal.
...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /srv/vendor/ruby/2.5.0/gems/nokogiri-1.8.4/ext/nokogiri
/usr/bin/ruby -r ./siteconf20180709-1-dxdiny.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.3.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.8
with the following patches applied:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.8.tar.gz into
tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.8... OK
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
/srv/vendor/ruby/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:84:in
`apply_patch': Failed to complete patch task; patch(1) or git(1) is required.
(RuntimeError)
from
/srv/vendor/ruby/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:92:in
`block in patch'
from
/srv/vendor/ruby/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:90:in
`each'
from
/srv/vendor/ruby/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:90:in
`patch'
from
/srv/vendor/ruby/2.5.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:152:in
`cook'
from extconf.rb:365:in `block (2 levels) in process_recipe'
from extconf.rb:257:in `block in chdir_for_build'
from extconf.rb:256:in `chdir'
from extconf.rb:256:in `chdir_for_build'
from extconf.rb:364:in `block in process_recipe'
from extconf.rb:262:in `tap'
from extconf.rb:262:in `process_recipe'
from extconf.rb:551:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/srv/vendor/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /srv/vendor/ruby/2.5.0/gems/nokogiri-1.8.4
for inspection.
Results logged to
/srv/vendor/ruby/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.4/gem_make.out
An error occurred while installing nokogiri (1.8.4), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.8.4' --source
'https://rubygems.org/'` succeeds before bundling.

Ruby gems bundle install failure

I am installing Diaspora (open source social networking) in Ubuntu 16.04 using these directions. Installation instructions call for using Ruby Version Manager to install Ruby and then using Bundler to add some required gems. Ruby installs, then the command to use the bundler
:~/diaspora$ bin/bundle install --full-index
makes some progress and then fails at this step:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:/home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/home/ubuntu/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180215-26943-187isn6.rb extconf.rb
checking for -lstdc++... yes
creating Makefile
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR=" clean
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
virtual memory exhausted: Cannot allocate memory
Makefile:209: recipe for target 'unf.o' failed
make: *** [unf.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/unf_ext-0.0.7.4/gem_make.out
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4'` succeeds before bundling.
In Gemfile:
asset_sync was resolved to 2.2.0, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
I updated to gcc-7 and g++-7, and appear to be using them:
:~/diaspora$ update-alternatives --display gcc
gcc - auto mode
link best version is /usr/bin/gcc-7
link currently points to /usr/bin/gcc-7
link gcc is /usr/bin/gcc
/usr/bin/gcc-7 - priority 10
:~/diaspora$ update-alternatives --display g++
g++ - auto mode
link best version is /usr/bin/g++-7
link currently points to /usr/bin/g++-7
link g++ is /usr/bin/g++
/usr/bin/g++-7 - priority 10
I also successfully installed unf_ext without Bundler using
:~/diaspora$ gem install unf_ext -v '0.0.7.4'
and it is there:
:~/diaspora$ gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
bundler (default: 1.16.1)
bundler-unload (1.0.2)
did_you_mean (1.1.0)
executable-hooks (1.3.2)
gem-wrappers (1.3.2, 1.2.7)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
net-telnet (0.1.1)
openssl (default: 2.0.3)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.0.0)
rdoc (default: 5.0.0)
rubygems-bundler (1.4.4)
rubygems-update (2.7.5, 2.6.14)
rvm (1.11.3.9)
test-unit (3.2.3)
unf_ext (0.0.7.5, 0.0.7.4, 0.0.7.2)
xmlrpc (0.2.1)
... but the same error persists.
Looking to understand the source of the error and how to resolve.
Your box is running out of memory during the installation:
virtual memory exhausted: Cannot allocate memory
It is killing the install. You should increase your system's memory.

Resources