Skip to content

fails on older linux kernels #50

@etcusrvar

Description

@etcusrvar

I'm running ruby on a linux device with a 3.10.x kernel (I'm not able to update the kernel.) I've installed ruby via homebrew.

Running a simple script

require 'tmpdir'
temp_dir = Dir.mktmpdir

fails with

/home/linuxbrew/.linuxbrew/Cellar/ruby/3.4.4/lib/ruby/3.4.0/tmpdir.rb:152:in 'Random.urandom': failed to get urandom (RuntimeError)
	from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.4.4/lib/ruby/3.4.0/tmpdir.rb:152:in 'next'
	from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.4.4/lib/ruby/3.4.0/tmpdir.rb:176:in 'Dir::Tmpname.create'
	from /home/linuxbrew/.linuxbrew/Cellar/ruby/3.4.4/lib/ruby/3.4.0/tmpdir.rb:99:in 'Dir.mktmpdir'
	from mktmp.rb:2:in '<main>'

This is a similar issue to ruby/rubygems#5941.
One fix would be to use openssl the same way they do in ruby/securerandom@fbce06e

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions