Comments (9)
@roadsigngit In this example, you are missing the resty
command-line utility in your PATH
environment, which is shipped with OpenResty or from its original github repository openresty/resty-cli
.
from opm.
@roadsigngit opm assumes the directory layout of OpenResty. For custom setup, you'll have to either 1) copy the OpenResty directory structure or 2) add the paths of your resty, nginx, and luajit executables to your PATH environment.
from opm.
@roadsigngit It's generally a bad idea to use opm
outside OpenResty since you are simply asking for troubles :) It could work but you need to be very careful.
from opm.
thanks agentzh,i act on your suggestion and it works!
from opm.
ERROR: luajit is required but is not available according to resty:
tinywan@tinywan:/opt/openresty/bin$ resty -e 'print("hello")'
hello
tinywan@tinywan:/opt/openresty/bin$ sudo ./opm get bungle/lua-resty-session
* Fetching bungle/lua-resty-session
Downloading https://opm.openresty.org/api/pkg/tarball/bungle/lua-resty-session-2.17.opm.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33837 100 33837 0 0 273k 0 --:--:-- --:--:-- --:--:-- 275k
* Fetching openresty/lua-resty-string
Downloading https://opm.openresty.org/api/pkg/tarball/openresty/lua-resty-string-0.09.opm.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6163 100 6163 0 0 50432 0 --:--:-- --:--:-- --:--:-- 50516
sh: 1: resty: not found
ERROR: luajit is required but is not available according to resty:
from opm.
@Tinywan You know that sudo may have a different PATH env than your default shell session? You can try sudo resty -e 'print("hello")'
instead.
from opm.
@agentzh thanks ,
tinywan@tinywan:~/Lua$ sudo resty -e 'print("hello")'
sudo: resty:Can not find command
switch root install success
[root@/opt/openresty/bin]# ./opm --cwd get bungle/lua-resty-session
* Fetching bungle/lua-resty-session
Downloading https://opm.openresty.org/api/pkg/tarball/bungle/lua-resty-session-2.17.opm.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33837 100 33837 0 0 261k 0 --:--:-- --:--:-- --:--:-- 262k
* Fetching openresty/lua-resty-string
Downloading https://opm.openresty.org/api/pkg/tarball/openresty/lua-resty-string-0.09.opm.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6163 100 6163 0 0 42986 0 --:--:-- --:--:-- --:--:-- 44338
Package openresty/lua-resty-string 0.09 installed successfully under /opt/openresty/bin/resty_modules/ .
Package bungle/lua-resty-session 2.17 installed successfully under /opt/openresty/bin/resty_modules/ .
from opm.
@Tinywan This is Linux basics. You should either change your suders file or just pass the -E
option to the sudo
command.
from opm.
@agentzh thanks ,this is OK
su - root
vim /etc/sudoers
tinywan ALL=(ALL:ALL) ALL
wq!
from opm.
Related Issues (20)
- Site opm.openresty.org is down!
- ERROR: luajit is required but is not available according to /opt/nginx/site/../bin/resty: LuaJIT 2.1.ROLLING HOT 1
- How can I get the latest version of a package in CLI? HOT 3
- How to skip the repo_link check? HOT 1
- Adding my repo to the list HOT 3
- OpenResty without OPM? HOT 4
- opm failed to index package HOT 11
- OPM pending to index packages HOT 5
- Allow bundling non-Lua files HOT 3
- OPM sort packages by stars and downloads
- opm install error. "openresty is required but is not available according to resty: resty 0.25" HOT 1
- feature request: test info and recommendations
- opm upload keep response ERROR: /root/.opmrc: bad "github_token" HOT 2
- opm.openresty.org site appears to be down (TLS error) HOT 2
- opm upload with github_account as an organization results in 500 error HOT 1
- Opm search returning duplicates HOT 1
- bad searching result in https://opm.openresty.org/search?q= HOT 1
- Markdown parsing mistakes HOT 1
- Unable to typo-fix published package HOT 2
- Not able to get any package due to SSL error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opm.