module 'lpeg_patterns.http' not found but lua-lpeg-patterns installed

Bug #1792052 reported by Moses Moore
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lua-http (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Using Lua 5.3 and lua-lpeg-patterns 0.4-1

Steps to reproduce:

    $ lua <<<"local hr = require 'http.request'"

Expected outcome: no output (success)

Seen outcome:

lua: /usr/share/lua/5.3/http/request.lua:2: module 'lpeg_patterns.http' not found:
 no field package.preload['lpeg_patterns.http']
 no file '/usr/local/share/lua/5.3/lpeg_patterns/http.lua'
 no file '/usr/local/share/lua/5.3/lpeg_patterns/http/init.lua'
 no file '/usr/local/lib/lua/5.3/lpeg_patterns/http.lua'
 no file '/usr/local/lib/lua/5.3/lpeg_patterns/http/init.lua'
 no file '/usr/share/lua/5.3/lpeg_patterns/http.lua'
 no file '/usr/share/lua/5.3/lpeg_patterns/http/init.lua'
 no file './lpeg_patterns/http.lua'
 no file './lpeg_patterns/http/init.lua'
 no file '/usr/local/lib/lua/5.3/lpeg_patterns/http.so'
 no file '/usr/lib/x86_64-linux-gnu/lua/5.3/lpeg_patterns/http.so'
 no file '/usr/lib/lua/5.3/lpeg_patterns/http.so'
 no file '/usr/local/lib/lua/5.3/loadall.so'
 no file './lpeg_patterns/http.so'
 no file '/usr/local/lib/lua/5.3/lpeg_patterns.so'
 no file '/usr/lib/x86_64-linux-gnu/lua/5.3/lpeg_patterns.so'
 no file '/usr/lib/lua/5.3/lpeg_patterns.so'
 no file '/usr/local/lib/lua/5.3/loadall.so'
 no file './lpeg_patterns.so'
stack traceback:
 [C]: in function 'require'
 /usr/share/lua/5.3/http/request.lua:2: in main chunk
 [C]: in function 'require'
 stdin:1: in main chunk
 [C]: in ?

This may be a problem in lua-lpeg-patterns missing code for lua 5.3 , but I don't know whether to file a bug with that package or with this package; I'm filing a bug with this package since it's what's throwing the error.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: lua-http 0.1-3
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
Uname: Linux 4.15.0-33-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue Sep 11 20:13:42 2018
InstallationDate: Installed on 2016-06-05 (828 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: lua-http
UpgradeStatus: Upgraded to bionic on 2018-04-27 (137 days ago)

Revision history for this message
Moses Moore (moses-ubuntu) wrote :
Revision history for this message
Moses Moore (moses-ubuntu) wrote :

A year later and this is still an obstacle. I resorted to ph,err = io.popen("curl " .. URL , "r")

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lua-http (Ubuntu):
status: New → Confirmed
Revision history for this message
ChrisAga (chrisaga) wrote (last edit ):

Confirm : same problem here with lua-http on Ubuntu 22.04 "jammy" :-(

Workaround :
1) apt install libssl-dev
2) luarocks install http

This may install from luarocks a bunch of modules you already have installed from Ubuntu packages :-(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.