undefined symbol: lua_rotate - nginx

I had done below steps,
downloaded lua-cjson-2.1.0.7 from this repo, Not really know what went wrong. can anybody know whats going on and how to resolve this?
make install
mkdir -p /usr/local/lib/lua/5.1
rm -f /usr/local/lib/lua/5.1/cjson.so
cp cjson.so /usr/local/lib/lua/5.1
chmod 755 /usr/local/lib/lua/5.1/cjson.so
Then,
sudo systemctl restart nginx.service
Error:
2020/02/19 06:59:52 [error] 29524#29524: *1 lua entry thread aborted: runtime error: error loading module 'cjson' from file '/usr/local/lib/lua/5.1/cjson.so':
/usr/local/lib/lua/5.1/cjson.so: undefined symbol: lua_rotate
stack traceback:
coroutine 0:
[C]: in function 'require'
nginx.conf has below :
lua_package_path "/usr/local/lib/lua/?.lua;;";
And
/usr/bin/lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio

Related

How do I cross-compile a Qt-project with a recipe in yocto

I am trying to Cross-compile a qt-project from a recipe. I have created a recipe file but when I try to bitbake it. I am met with error
Here is my recipe file
DESCRIPITION = "my_project File Transfer"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "git://git#bitbucket.org/johndoe/my_ui.git;protocol=ssh;rev=master"
S = "${WORKDIR}/git/my_project"
RDEPENDS_${PN} ="bash"
inherit qmake5
require recipes-qt/qt5/qt5.inc
do_install_append() {
## Creating Folder Structure
install -d ${D}/opt/my_project/bin
install -d ${D}/home/root/my_project
install -d ${D}/home/root/my_project/font
install -d ${D}/home/root/my_project/Images
install -d ${D}/home/root/my_project/Qml
###compile the project
oe_runmake INSTALL_ROOT=${D} install
#### Copying files
install -m 0755 ${S}/font/* ${D}/home/root/my_project/font/
install -m 0755 ${S}/Images/* ${D}/home/root/my_project/Images/
install -m 0755 ${S}/Qml/* ${D}/home/root/my_project/Qml/
}
FILES_${PN} = "/home/root/my_project"
The error that I see is
Sstate summary: Wanted 335 Found 327 Missed 8 Current 1958 (97% match, 99% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: myproject-project-1.0-r0 do_configure: Error calling /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro --
ERROR: myproject-project-1.0-r0 do_configure: Function failed: do_configure (log file is located at /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982)
ERROR: Logfile of failure stored in: /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982
Log data follows:
| DEBUG: Executing shell function qmake5_base_preconfigure
| DEBUG: Shell function qmake5_base_preconfigure finished
| DEBUG: Executing shell function do_configure
| NOTE: qmake prevar substitution: ' '
| Could not find qmake spec 'linux-oe-g++'.
| Error processing project file: /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro
| ERROR: Error calling /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro --
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982)
ERROR: Task (/home/blue/yacto/poky-warrior-21.0.1/meta-rpi_custom/recipes-custom/myproject-project/myproject-project_1.0.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4242 tasks of which 4241 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/blue/yacto/poky-warrior-21.0.1/meta-rpi_custom/recipes-custom/myproject-project/myproject-project_1.0.bb:do_configure
I know that in order to cross-compile. I had to run qmake from my cross-compile tool-chain location and then run make command on it.
I am guessing that is what's missing in my recipe. So my question is, Do I add that in my do_configure
if thats the case can anyone help me or point me how do I populate my do_configure
Is it as simple as source /opt/poky/2.7.1/environment----
then qmake
I am drawing a blank at this step
Please let me know what am I doing wrong
Edit1: remove inherit allarch from recipe
I would just leave inherit qmake5 and put DEPENDS + = "qtbase qtxyz ...", qtxyz would be the list of other dependency modules.

Command failed when running ghost start

Fresh install, trying to run ghost start I get the following error:
Debug Information:
OS: Raspbian, v8.0
Node Version: v6.13.0
Ghost-CLI Version: 1.5.2
Environment: production
Command: 'ghost start'
An error occurred.
Message: 'Command failed: /bin/sh -c systemctl is-active ghost_blog-dev
unknown
'
Stack: Error: Command failed: /bin/sh -c systemctl is-active ghost_blog-dev
unknown
at makeError (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:169:9)
at module.exports.sync (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:338:15)
at handleShell (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:116:9)
at Function.module.exports.shellSync (/usr/lib/node_modules/ghost-cli/node_modules/execa/index.js:361:43)
at SystemdProcessManager.isRunning (/usr/lib/node_modules/ghost-cli/extensions/systemd/systemd.js:88:19)
at Instance.running (/usr/lib/node_modules/ghost-cli/lib/instance.js:120:34)
at StartCommand.run (/usr/lib/node_modules/ghost-cli/lib/commands/start.js:28:22)
at precheck.then (/usr/lib/node_modules/ghost-cli/lib/command.js:159:52)
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:613:11)
at run (bootstrap_node.js:387:7)
at startup (bootstrap_node.js:153:9)
at bootstrap_node.js:500:3
Code: 3
If I manually run the command that is says failed it seems to execute without error though I am not sure what it does. I assume it has something to do with checking with nginx if ghost has actually started or not.
Any suggestions would be very helpful! Thank you!
I faced with the same problem. You should add your service file to etc directory also as symbolic link using the following command:
sudo ln -sf /var/www/html/your-blog/system/files/ghost_blog-yourblog.service /etc/systemd/system/ghost_blog-yourblog.service
After adding this, you should execute the following commands:
sudo systemctl stop ghost_blog-yourblog.service
sudo systemctl start ghost_blog-yourblog.service
Then, I hope you'll see 'active' result for is-active command.

nginx module with json-c undefined symbol: json_object_to_json_string

for install nginx with hello module(this module use #include )
i use yum -y install json-c json-c-devel before install nginx
make && make install is successful. but when i run nginx test
/usr/sbin/nginx -t
error message is show up :
nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_hello_module.so" failed (/etc/nginx/modules/ngx_http_hello_module.so: undefined symbol: json_object_to_json_string) in /etc/nginx/nginx.conf:5
nginx: configuration file /etc/nginx/nginx.conf test failed
ldd /usr/sbin/nginx
json-c library is not loadded! what can i do?
solve this problem ;)
method is : ./configure ... --with-ld-opt="-ljson"
after success install(make && make install), type ldd /usr/sbin/ngin then you will show loaded library file(.so)

Memory issue with meteor up (mup) on Digital Ocean

I couldn't find existing posts related to my issue. On a Digital Ocean Droplet, mup setup went fine, but when I try to deploy, I get the following error. Any ideas? Thanks!
root#ts:~/ts-deploy# mup deploy
Meteor Up: Production Quality Meteor Deployments
Building Started: /root/TS/
Bundling Error: code=137, error:
-------------------STDOUT-------------------
Figuring out the best package versions to use. This may take a moment.
-------------------STDERR-------------------
bash: line 1: 31217 Killed meteor build --directory /tmp/dc37af3e-eca0-4a19-bf1a-d6d38bb8f517
Below are the logs. node -v indicates I am using 0.10.31. How do I check which script is exiting with the error? Any other ideas? Thanks!
error: Forever detected script exited with code: 1
error: Script restart attempt #106
Meteor requires Node v0.10.29 or later.
error: Forever detected script exited with code: 1
error: Script restart attempt #107
Meteor requires Node v0.10.29 or later.
error: Forever detected script exited with code: 1
error: Script restart attempt #108
stepping down to gid: meteoruser
stepping down to uid: meteoruser
After I went back to an old backup of the DO Droplet, and re-ran mup setup and mup deploy, I now get this in the command line output
Building Started: /root/TS
Bundling Error: code=134, error:
-------------------STDOUT-------------------
Figuring out the best package versions to use. This may take a moment.
-------------------STDERR-------------------
FATAL ERROR: JS Allocation failed - process out of memory
bash: line 1: 1724 Aborted (core dumped) meteor build --directory /tmp/bfdbcb45-9c61-435f-9875-3fb304358996
and this in the logs:
>> stepping down to gid: meteoruser
>> stepping down to uid: meteoruser
Exception while invoking method 'login' TypeError: Cannot read property '0' of undefined
at ServiceConfiguration.configurations.remove.service (app/server/accounts.js:7:26)
at Object.Accounts.insertUserDoc (packages/accounts-base/accounts_server.js:1024)
at Object.Accounts.updateOrCreateUserFromExternalService (packages/accounts-base/accounts_server.js:1189)
at Package (packages/accounts-oauth/oauth_server.js:45)
at packages/accounts-base/accounts_server.js:383
at tryLoginMethod (packages/accounts-base/accounts_server.js:186)
at runLoginHandlers (packages/accounts-base/accounts_server.js:380)
at Meteor.methods.login (packages/accounts-base/accounts_server.js:434)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1594)
at packages/ddp/livedata_server.js:648
Exception while invoking method 'login' TypeError: Cannot read property '0' of undefined
at ServiceConfiguration.configurations.remove.service (app/server/accounts.js:7:26)
at Object.Accounts.insertUserDoc (packages/accounts-base/accounts_server.js:1024)
at Object.Accounts.updateOrCreateUserFromExternalService (packages/accounts-base/accounts_server.js:1189)
at Package (packages/accounts-oauth/oauth_server.js:45)
at packages/accounts-base/accounts_server.js:383
at tryLoginMethod (packages/accounts-base/accounts_server.js:186)
at runLoginHandlers (packages/accounts-base/accounts_server.js:380)
at Meteor.methods.login (packages/accounts-base/accounts_server.js:434)
at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1594)
at packages/ddp/livedata_server.js:648
The memory issue stems from using DigitalOcean's $5 Droplet. To solve the problem, I added swap to the server, as explained in detail below.
Create and enable the swap file using the dd command :
sudo dd if=/dev/zero of=/swapfile bs=1024 count=256k
“of=/swapfile” designates the file’s name. In this case the name is swapfile.
Next prepare the swap file by creating a linux swap area:
sudo mkswap /swapfile
The results display:
Setting up swapspace version 1, size = 262140 KiB
no label, UUID=103c4545-5fc5-47f3-a8b3-dfbdb64fd7eb
Finish up by activating the swap file:
sudo swapon /swapfile
You will then be able to see the new swap file when you view the swap summary.
swapon -s
Filename Type Size Used Priority
/swapfile file 262140 0 -1
This file will last on the virtual private server until the machine reboots. You can ensure that the swap is permanent by adding it to the fstab file.
Open up the file:
sudo nano /etc/fstab
Paste in the following line:
/swapfile none swap sw 0 0
Swappiness in the file should be set to 10. Skipping this step may cause both poor performance, whereas setting it to 10 will cause swap to act as an emergency buffer, preventing out-of-memory crashes.
You can do this with the following commands:
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
To prevent the file from being world-readable, you should set up the correct permissions on the swap file:
sudo chown root:root /swapfile
sudo chmod 0600 /swapfile
This only worked for me by increasing the swap space to 1gb:
Make all swap off
sudo swapoff -a
Resize the swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
Make swapfile usable
sudo mkswap /swapfile
Make swapon again
sudo swapon /swapfile

Understanding error message from Meteor.js: Error: EACCES, permission denied

My meteor.js application is crashing. I am getting the following error. It appears that the error is not in my application code. I would appreciate if someone could take a look at the following message and let me know how I could get rid of this error.
Error Message
Your application is crashing. Waiting for file change.
=> Modified -- restarting.
=> Errors prevented startup:
Exception while bundling application:
Error: EACCES, permission denied '/Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js'
at Object.fs.unlinkSync (fs.js:582:18)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:278:10)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:274:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/username/.meteor/tools/275efdf2db/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/username/.meteor/tools/275efdf2db/tools/files.js:272:9)
at _.extend.write_to_directory (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:794:11)
at Object.exports.bundle (/Users/username/.meteor/tools/275efdf2db/tools/bundler.js:873:12)
at /Users/username/.meteor/tools/275efdf2db/tools/run.js:694:26
at exports.inFiber (/Users/username/.meteor/tools/275efdf2db/tools/fiber-helpers.js:24:12)
=> Your application is crashing. Waiting for file change.
I searched some more on the topic and it appears to be a problem with using sudo to install some packages which meteorite requires. As suggested on this Github issues page one way to solve this is to remove the folder /.meteor/local/build in the application and restart meteor.
This works for me: re-set the chown permissions of /.meteor/local/build (to avoid use sudo) to your user.
For example, my user is "skozz". In my project folder:
sudo chown -R skozz .meteor/local/build
Then run mrt or meteor
If the problem persists maybe you should set the same permissions to the main .npm folder. In my case:
chown -R skozz ~/.npm
try
chmod +x /Users/username/Dropbox/LearnSoftware_and_Math/LearnJavascript/LearnMeteor/microscope/.meteor/local/build/app/collections/posts.js
i solved the problem by completely removing purging uninstall ! nodejs and npm with this script 'os x' : sudo rm /usr/local/bin/npm
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /opt/local/bin/node
sudo rm /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
sudo rm -rf /usr/local/include/node/
after that i installed nodejs properly with the pkg (i'm on os x) downloaded on the nodejs website and instaled it then all worked fine with meteor update and cd path/to/meteor/project ; meteor

Resources