How snapcraft nodejs plugin handle the Node.js environment when you create an app snap for different OS? - plugins

I'm try to understand how the nodejs plugin i'm using to create snap node.js app handle the Node.js environment ? Example in this application :
parts:
webserver:
source: .
plugin: nodejs
nodejs-version: "12.13.1"
nodejs-package-manager: "yarn"
nodejs-yarn-version: "v1.21.1"
I'm defining to use Node.js v12.13.1 and Yarn v1.21.1 lunching the snapcraft commands:
snapcraft clean
snapcraft --debug
snap install my-snap-file.snap --dangerous
Now i'm able to run the command/service on my machine (amd64 Ubuntu 16.04 LTS) with Node.js v12.2.0 installed but i cant find the node.js env not in multipass instance not in another machine with installed Ubuntu Core 18, i mean i can't run command as node --version and so on and even the snap app doesn't work neither command neither service.
Other problem i've discovered digging in the Ubuntu Core 18 env installed on RaspBerry Pi3 is : When i've installed my snap with nodejs app in the folder /snap//bin i cannot run the ./node exec ! i get the error :
./node: 1: ./node: Syntax error: "(" unexpected
My questions are :
Why i get the ./node error ?
my-snap-file.snap bundle the Node.js v12.3.1 inside the mysnap ?
how i can test the node.js is working with the right version in multipass and other machine where i've installed only the snap bundling node.js ?
THks

Thanks to forum.snapcraft.io i've solved the issue ... i'm posting here to help people to solve these kind of issues too. This error is due to the snap that is NOT build on the actual target architecture you want to run it on. Make sure you build eg. armhf (raspberry pi3) actually on an armhf architecture device.
architectures:
- build-on: amd64
run-on: [amd64, armhf]
here you tell snapcraft that building on amd64 produces binary snaps that can run on amd64 and armhf … which is indeed not true (since building on amd64 will pull in only amd64 binaries). i’d drop that statement completely and make sure to build the armhf version on an armhf device (or on build.snapcraft.io). (Credits Ogra)
Read the Link about architectures in snapcraft.yaml
https://forum.snapcraft.io/t/architectures/4972

Related

Mongo enterprise installation Error in Ubuntu 20.04

I have updated recently to Ubuntu 20.04 and facing problems while installing MongoDb enterprise.
digvj#digvj:~$ sudo apt-get install -y mongodb-enterprise
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-enterprise : Depends: mongodb-enterprise-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Also on running the command where i have specified every package of mongo it is showing this error:
digvj#digvj:~$ sudo apt-get install -y mongodb-enterprise=4.2.6 mongodb-enterprise-server=4.2.6 mongodb-enterprise-shell=4.2.6 mongodb-enterprise-mongos=4.2.6 mongodb-enterprise-tools=4.2.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-enterprise-server : Depends: libsensors4 (>= 1:3.0.0) but it is not installable
Depends: libsnmp30 (>= 5.7.3+dfsg-1.8ubuntu3.3~dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.
How can I resolve this?
MongoDB provides binary packages for some operating systems. Ubuntu 20.04 is not an operating system that the packages are available for.
You may be able to get MongoDB running on 20.04 by downloading and installing the packages it wants manually (for example, libsnmp30 and libsensors4).
If there has been, for example, a C library upgrade between 18.04 and 20.04, the 18.04 packages may not be usable on a 20.04 system, and this won't work.
If the question is for a production environment and you are using the enterprise edition of MongoDB you should probably stick with the supported operating systems like Ubuntu 18.04. If this is for a development environment, you could run MongoDB in Ubuntu 18.04 in Docker.
I have added the issue in MongoDb Zira issues and got the solution over there.
Here is the link to that:
https://jira.mongodb.org/browse/SERVER-48316

IBM Blockchain platform cannot rebuild native dependencies

I trying to get the IBM Blockchain platform to work in Visual studio code (on Linux), but it keeps coming back with:
Could not rebuild native dependencies Failed to execute command "npm" with arguments
"rebuild, grpc, --target=6.1.5, --runtime=electron, --update-binary, --fallback-to-build, --
target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure
that you have node and npm installed
I have node and npm installed
node -v
v10.17.0
and
npm -v
6.11.3
satisfying the constraints. I have visual studio code version 1.41.1. What could be thie issue?
The problem you are experiencing is described in this issue https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1621
The issue is that there are no pre-built versions of grpc used by the fabric node sdk for electron 6 currently and due to changes in newer versions of gcc the grpc node module fails to compile when it falls back to using source because of no pre-built versions
The easiest solution is to downgrade for vscode 1.39 and install the extension.
Alternative options are to install gcc version 7 and make that the default in your linux environment or you could install a version of linux that has gcc version 7 as the default for example ubuntu 18.04 (which would allow grpc to compile from source)

Error: No module named 'PyQt5.sip' - When installing eric6-19.03

I have noticed a number of similar questions on stackoverflow, but none that really helped me with my current challenge. I have been attempting to install eric6 on my Raspberry Pi setup. And then I encountered the following messages:
Checking dependencies
Python Version: 3.6.8
PyQt5 could not be detected.
Error: No module named 'PyQt5.sip'
Shall 'PyQt5' be installed using pip? (Y/n) Y
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.6/site-packages (5.12)
Sorry, please install PyQt5.
Error: No module named 'PyQt5.sip'
And when I attempt to use the pip list to look at what has been installed (as I previously already managed to make and install the PyQt5 from source code):
Package Version
---------- -------
pip 19.0.3
PyQt5 5.12
setuptools 40.6.2
sip 4.19.14
So, how do I overcome the issue that I am currently facing? By the way, I am using the following command when attempting to install eric6:
python3 install.py
Thought you might need to know that if it helps.
Python 3.6 isn't available in any Raspbian distribution, so I assume you installed this yourself. You can't install an out-of-distribution Python version and expect distribution Python packages to work. You have PyQt5 installed, yes, but it's the version of PyQt built for Python 3.5 (I'm assuming you're on Raspbian Stretch).
Sometimes you can install Python libraries with pip, and in theory that could work to install the correct version of PyQt for your version of Python, but PyQt only provides wheels for x86 on PyPI, not for Arm, so PyQt is not pip installable on the Pi. The only way to get PyQt on Raspberry Pi is via apt, where your choices are Jessie (old stable - with Python 3.4), Stretch (current stable - with Python 3.5), and Buster (unstable/testing - with Python 3.7). If there's a need for Python >3.5, your best bet is to try upgrading to Buster, but bear in mind it's not ready for release yet.

how can i install the solidity(solc) in ubuntu mate(using raspberry pi3)

I'd like to install a Solidity Compiler on the Raspberry Pi3. But I have no idea how.
the operating system is using Ubuntu Mate.
If there's no way above, could you let me know about Rasbian?
Having Node Package Manager installed:
npm install -g solc

Although GNOME Shell integration extension is running, native host connector is not detected -CentOS7

When i visit https://extensions.gnome.org/
I have the latest Centos7 build and updated, i installed the addon ( both on firefox and chrome) and i still get this message..
In the documentation where it explains how to cmake the native connector and install it - when i tried to build it it gave me a error log:
The system is: Linux - 3.10.0-862.el7.x86_64 - x86_64
I don't know what else to do...
I also run yum install gnome-shell-extension*, yum install gnome-shell-extension, and yum install gnome-shell
Please help, i am new to Linux