skip to Main Content

I’m trying to install a customised openresty on a Centos7 VM.

sudo rpm -i openresty-1.19.3.1-1.el7.x86_64.rpm

However I get this error:

        perl(Test::Nginx::Socket::Lua) is needed by openresty-1.19.3.1-1.el7.x86_64
        perl(Test::Nginx::Socket::Lua::Stream) is needed by openresty-1.19.3.1-1.el7.x86_64

But I already had those dependencies installed with cpan, and when I try to install them again, I get:

Test::Nginx is up to date (0.29).

Text::Nginx includes the socket::lua subclasses.

I’m not sure what is going on there. It seems that the rpm isn’t picking up the existence of those dependencies. I did a restart, refresh ..etc, but no change.

3

Answers


  1. Chosen as BEST ANSWER

    Eventually what worked for me is to create a local repo, which installed the dependencies itself.

    I also found

    yum repo-pkgs my-rpms install

    Much more reliable to install all packages in a repo than the other answers found through google.


  2. Check my very similar answer about python How to include pip packages in rpm build

    RPM checks what you have in rpmdb not what you have installed on disk. RPM cannot really understand all these ecosystems (python, perl, ruby, rust, java, nojs….).

    You either need to package the dependency (cpan2spec is your friend) or use create-fake-rpm.

    Login or Signup to reply.
  3. RPM only knows about stuff that was installed using rpm. If you install a CPAN module directly from CPAN, then RPM won’t know about it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search