问题现状:
[root@iZbp17o0mf9u89u7citx41Z bin]# opm
Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/opm line 16.
BEGIN failed--compilation aborted at /usr/local/bin/opm line 16.
问题原因:
opm包缺少对应的依赖(perl-Digest-MD5)
解决步骤:
- 安装依赖包
[root@iZbp17o0mf9u89u7citx41Z bin]# yum -y install perl-Digest-MD5
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): extras/7/x86_64/primary_db | 232 kB 00:00:00
(2/4): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(3/4): epel/x86_64/primary_db | 6.9 MB 00:00:00
(4/4): updates/7/x86_64/primary_db | 7.1 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package perl-Digest-MD5.x86_64 0:2.52-3.el7 will be installed
--> Processing Dependency: perl(Digest::base) >= 1.00 for package: perl-Digest-MD5-2.52-3.el7.x86_64
--> Running transaction check
---> Package perl-Digest.noarch 0:1.17-245.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================
Installing:
perl-Digest-MD5 x86_64 2.52-3.el7 base 30 k
Installing for dependencies:
perl-Digest noarch 1.17-245.el7 base 23 k
Transaction Summary
==============================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 53 k
Installed size: 82 k
Downloading packages:
(1/2): perl-Digest-1.17-245.el7.noarch.rpm | 23 kB 00:00:00
(2/2): perl-Digest-MD5-2.52-3.el7.x86_64.rpm | 30 kB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 295 kB/s | 53 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Digest-1.17-245.el7.noarch 1/2
Installing : perl-Digest-MD5-2.52-3.el7.x86_64 2/2
Verifying : perl-Digest-1.17-245.el7.noarch 1/2
Verifying : perl-Digest-MD5-2.52-3.el7.x86_64 2/2
Installed:
perl-Digest-MD5.x86_64 0:2.52-3.el7
Dependency Installed:
perl-Digest.noarch 0:1.17-245.el7
Complete!
- 测试是否可用
[root@iZbp17o0mf9u89u7citx41Z bin]# opm -h
opm [options] command package...
Options:
-h
--help Print this help.
--install-dir=PATH Install into the specified PATH directory instead of the system-wide
OpenResty installation tree containing this tool.
--cwd Install into the current working directory under ./resty_modules/
instead of the system-wide OpenResty installation tree containing
this tool.
Commands:
build Build from the current working directory a package tarball ready
for uploading to the server.
clean ARGUMENT... Do clean-up work. Currently the valid argument is "dist", which
cleans up the temporary files and directories created by the "build"
command.
info PACKAGE... Output the detailed information (or meta data) about the specified
packages. Short package names like "lua-resty-lock" are acceptable.
get PACKAGE... Fetch and install the specified packages. Fully qualified package
names like "openresty/lua-resty-lock" are required. One can also
specify a version constraint like "=0.05" and ">=0.01".
list List all the installed packages. Both the package names and versions
are displayed.
remove PACKAGE... Remove (or uninstall) the specified packages. Short package names
like "lua-resty-lock" are acceptable.
search QUERY... Search on the server for packages matching the user queries in their
names or abstracts. Multiple queries can be specified and they must
fulfilled at the same time.
server-build Build a final package tarball ready for distribution on the server.
This command is usually used by the server to verify the uploaded
package tarball.
update Update all the installed packages to their latest version from
the server.
upgrade PACKAGE... Upgrade the packages specified by names to the latest version from
the server. Short package names like "lua-resty-lock" are acceptable.
upload Upload the package tarball to the server. This command always invokes
the build command automatically right before uploading.
For bug reporting instructions, please see:
<https://openresty.org/en/community.html>
Copyright (C) Yichun Zhang (agentzh). All rights reserved.