best way to install node js for C+++ add-on development purpose - c++

I install node.js since I heard that we should prefer apt-get installation to native installation from source since it is easy to update or remove. Is it true?
What's the right way to determine the correct gcc version to develop node.js C++ addon if we install node.js using apt-get?
I installed the node.js using apt-get (PPA: https://launchpad.net/~chris-lea/+archive/node.js/+packages) on Ubuntu 12.04. For the C++ development, the gcc(g++) version of node.js and add-on should match to make sure the C++ symbols consistent, right?
Thanks.

Use nvm to install from source:
nvm install [-s] <version>
and Node.js source code will be placed in '$NVM_DIR/src'.
Then use node-gyp to configure the environment and build your addon.
cd /path/to/your/node/addon/binding.gyp/file/
node-gyp configure
node-gyp build
It is practical, you don't need root permissions and will be compiled in the same environment.

Related

How can i use expo cli with my smartphone on termux

Hello friends i'm new here.
I want to run react native project with my android but i got this error when i run expo cli on termux Error: Platform not supported
error illustration
Ps: i use TECNO SPARK 5 Pro with Android 10
I had the same problem. It was solved by reverting to version 4.2.1. Uninstall expo-cli and install expo-cli#4.2.1 .
You can create easyly by using simple trick
First you need to install one linus operating systeam (ubantu2.0) in your termux android application
*You can easyly install ubantu os with anylinux application just download from playstore *
After instaling the ubantu os in your android device then you need to install nodejs in your ubantu os inaide termux just type commend apt update && apt upgrade && apt install nodejs
After this commend you need to put one more command for instaling react -native(expo)
npm install -g expo-cli
If you face any problem then you need to upgrade your nodejs version with letest version with using nvm
Here is orginal documentation about letest version nodejs using nvm https://www.vultr.com/docs/install-nvm-and-node-js-on-ubuntu-20-04/

How can i use the upgraded version of Sqlite3 for my Django project?

I am trying to create a django application on a server running on Centos 7. When i tried to migrate the application, i got the error:"SQLite 3.8.3 or later required (found 3.7.17)."
Thereafter I installed the latest-version of Sqlite3. When i run sqlite3 --version, it showns 3.28.0 which is the latest version.
Howevere, when I tried my migrate the project I got the same error i.e "SQLite 3.8.3 or later required (found 3.7.17)." Can someone please suggest how to ensure that python/django is configured with the latest version of sqlite3 rather than the older one which came along with the OS?
Unfortunately CentOS only has v3.7.17 in their repos.
So you need to install v3.8.3 or the latest from source.
To do that, you can install from source (I'm not sure how to use the precompile binaries)
Download the source code from sqlite downloads
cd /opt
wget https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
tar -xzf sqlite-autoconf-3280000.tar.gz
cd sqlite-autoconf-3280000
./configure
make
sudo make install

Building a Docker file

I am trying to reproduce my development environment in a docker image. I am able to get simple dependencies met such as python+a couple standard packages, largely through the builds from docker hub. But when it comes to installing xgboost or pandas I am having great difficulty.
After looking into the error messages it looked like I had the wrong version of g++ installed. The build had 4.7, but xgboost requires 4.9+. As I tried to update g++ I kept running into a wall where I couldn't update g++ because I needed another package (apt-add-repository), but to install that package I needed another (apt-utils) etc.
Does anyone have any general advice with setting up a Docker image or for this specific problem of upgrading the g++.
Here is the Docker file:
FROM continuumio/anaconda
MAINTAINER maintainer
RUN apt-get install -y g++-4.9
One test would be to start from a gcc:4.9 image (which uses wheezy), and try to add what anaconda Dockerfile does.
That way, you start from an image with the right gcc.
You first need to make sure your source list is up-to-date. The line with RUN command in the dockerfile should be
RUN apt-get update && apt-get install -y g++

SQLpp11 installation with PostgreSQL connector

How do I install SQLpp11 with PostgreSQL connector on Linux?
I use Linux Mint 17.2, Eclipse CDT and I have PostgreSQL 9.4 already installed.
I know, it's trivial but I'm doing this first time. I'm a newbie.
GitHub repository:
https://github.com/rbock/sqlpp11
https://github.com/matthijs/sqlpp11-connector-postgresql
Both repositories are using cmake, therefore you should be fine with
mkdir build
cd build
cmake .. # maybe some other options
make
make install
in each of the repos, starting with sqlpp11.

How setup C++ SDK in IntelliJ IDEA on linux?

I need to know how to configure the path to C++ SDK for IntelliJ IDEA 10.04.
I installed C/C++ plugin, however I don't know what is the proper path to C++ SDK.
I am using ubuntu 11.04.
after running
sudo aptitude install build-essential
then restart idea and go to terminal and run
which gcc
now copy the output into ideas settings -> IDE settings -> c/c++
and paste what you copied into the path to gcc.
do the same process for the gdb
after doing that then idea will add the sdk to the drop down menu in the create project menu
after installing the c++ plugin you should see the C/C++ project option when you create a new module - i think you're seeing the point where it's asking you for the cpp sdk location.
run
sudo aptitude install build-essential
Then restart intellij - it should autodetect that it's installed and offer you the option in the drop down instead of asking you to browse to the SDK directory