How can we enable UCI interface available on openwrt on ubuntu. - ubuntu-14.04

How can we enable UCI interface available on openwrt on ubuntu. Currently, I installed libuci and libubox, with which I am able to get and set configuration parameters for files under /etc/config in ubuntu. But these values are not reflected in system services when I do a service restart. For example I set some values in /etc/config/network and /etc/config/dhcp . But /etc/init.d/networking reload, the system is picking up values from /etc/dnsmasq.conf and /etc/network/interfaces.

You can run uci in Ubuntu by following the instructions available in (external link). Make UCI in UBUNTU 16.04 , Raspbian Jessie or similar.
First make a directory for download source codes
mkdir ~/Desktop/uci
Install json-c
Install the required packages:
sudo apt-get install dh-autoreconf git
Download source code:
cd ~/Desktop/uci
git clone https://github.com/json-c/json-c.git
Make and install json-c:
cd json-c
sh ./autogen.sh
./configure
make
sudo make install
make check
Install libubox
Install the required packages:
sudo apt-get install lua5.1 liblua5.1-0-dev cmake
Download source code:
cd ~/Desktop/uci
git clone https://git.openwrt.org/project/libubox.git
Install libubox
cd libubox
cmake .
make
sudo make install
Install uci
Download source code:
cd ~/Desktop/uci
git clone https://git.openwrt.org/project/uci.git
Make and install uci:
cd uci
cmake .
sudo make install
Now you can use uci :
uci
If you still see this message:
error while loading shared libraries: libubox.so: cannot open shared object file: No such file or directory
edit this file:
sudo nano /etc/environment
Add this command into it:
LD_LIBRARY_PATH=/usr/local/lib
or this file
sudo nano /etc/profile
Add these commands into it:
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
Then restart your computer.

Related

How to build detect it easy on ubuntu 20.04 from horsicq github?

i have cloned project from this link: https://github.com/horsicq/Detect-It-Easy
And i don't know what to do next, read.me says this commands : chmod a+x configure
./configure
make
make install
But it doesn't work . i want to check docs from command line for java project
git clone --recursive https://github.com/horsicq/DIE-engine.git "--recursive" is very important. It clones all module
chmod a+x configure It makes the file "configure" executable.
./configure "configure" checks if the system has all nessecary packages. If it fails you should install these packages.
For Ubuntu: sudo apt-get install --quiet --assume-yes build-essential qt5-default qtbase5-dev qttools5-dev-tools qtscript5-dev
make It compiles the project
sudo make install It installs the program to system

Can't find Makefile of editorconfig-core-c

I am trying to install editorconfig-core-c. So I followed the following tutorial:
Tutorial of editorconfig-core-c
So I needed to do:
sudo apt-get install cmake libpcre3-dev
and
make install
But in which folder is the Makefile? I didn't found anything in ~/
Does anyone have a suggestion for me?
Try running the below commands to make, install it and then remove the downloaded files. The key steps you need are
Install any prerequisites
Download the source
Run cmake . in the downloaded directory to create the makefile
Install with sudo make install
A complete set of the commands needed is provided below.
sudo apt-get install cmake libpcre3-dev git
cd
git clone https://github.com/editorconfig/editorconfig-core-c.git
cd editorconfig-core-c/
cmake .
sudo make install
cd ..
rm -rf editorconfig-core-c/

Installing the libs3 on linux

Could someone pls give me a detailed procedure to intsall libs3 on LINUX? Just the procedure will do.
Thanks in advance.
These are the instructions to install libs3 on centos on a 64 bit machine.
According to their README, you are supposed to build an rpm package out of their source code using 'rpmbuild -ta '
1.) So first, install rpmbuild if it isn't installed already. [My install location is the default one: ~/rpmbuild]
2.) Clone libs3.
git clone https://github.com/bji/libs3.git
3.) Rename folder as libs3-trunk [rpmbuild complained if its name wasn't that, so...], create a tar.gz, copy it to SOURCES folder inside rpmbuild directory.
mv libs3 libs3-trunk
tar -zcvf libs3-trunk.tar.gz libs3-trunk/
mv libs3-trunk.tar.gz ~/rpmbuild/SOURCES
cd ~/rpmbuild/SOURCES
4.) Build the rpm
rpmbuild -ta libs3-trunk.tar.gz
cd ../RPMS/x86_64
5.) Install dependency libs3-2-2.0-5.1.x86_64.rpm from
[http://rpm.pbone.net/index.php3/stat/4/idpl/21900926/dir/centos_6/com/libs3-2-2.0-5.1.x86_64.rpm.html] OR [ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/dalgaaf:/ceph:/extra/CentOS_CentOS-6/x86_64/libs3-2-2.0-5.1.x86_64.rpm]
6.) Install the rpm:
Execute following as sudo:
rpm -Uvh libs3-2-2.0-5.1.x86_64.rpm
rpm -Uvh --replacefiles libs3-trunk-1.x86_64.rpm
rpm -Uvh libs3-devel-trunk-1.x86_64.rpm
7.) Install libcurl-devel/libxml2-devel through yum if you get following error:
make: curl-config: Command not found
make: xml2-config: Command not found
sudo yum install libcurl-devel.x86_64
sudo yum install libxml2-devel.x86_64
For ubuntu versions >=14.04, libs3-dev is available as an Ubuntu package.
So you just need to run:
sudo apt-get install libs3-dev

How can I (is it possible to) install mysql workbench locally?

I want to install a mysql workbench binary locally on my linux machine because I don't have sudo rights. I did this when I installed python using --prefix. Can this also be done with mysql workbench?
Yes, you can, provided that you are willing to compile Workbench from sources. You are advised however that you'll need sudo rights to install its compilation dependencies. Here are the steps:
Download Workbench's sources from the official download site. You should download the version tagged "Generic Linux (Architecture Independent), Compressed TAR Archive".
Uncompress the downloaded source file. From the linux terminal:
$ tar -zxvf mysql-workbench-whatever.tar.gz
Move to the directory with Workbench's source code:
cd mysql-workbench-whatever
Read the INSTALL file located in this directory to find out the required packages that you would need to install in order to compile Workbench. For Ubuntu here's the command to install them:
$ sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libglu1-mesa-dev libgl1-mesa-glx mesa-common-dev libmysqlclient15-dev uuid-dev liblua5.1-dev libpixman-1-dev libpcre3-dev libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev python-dev libboost-dev
Run autogen.sh with the path to where you want Workbench installed:
$ ./autogen.sh --prefix=~/bin/wb52
(The above command will get your Workbench's binaries in the directory bin/wb52 within your home directory once compiled). Just change the destination dir to whatever you like.
Compile and install MySQL Workbench:
$ make install
This will take some time (maybe half an hour depending on your system). If you have more than one CPU core available you should use, for instance:
$ make -j3 install
and this will use three cores for compilation (adjust the number of cores to whatever you find reasonable for your system).
Once compiled you can run Workbench's executable that will be located inside a bin directory within the path you set in step 5.
Have a lot of fun!

How can I add npm (node.js package manager) to the PATH?

I installed node.js like this:
cd /usr/local/bin/
git clone --depth 1 http://github.com/joyent/node.git
cd node
git checkout origin/v0.4 # optional. Note that master is unstable.
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
source ~/.profile
Then I executed this curl http://npmjs.org/install.sh | sh to install npm. After I logged out and logged back in, npm command wasn't recognized:
[/usr/local/bin/node]# npm install now
-bash: npm: command not found
What should I add to the PATH to have npm working?
Try this:
git clone https://github.com/npm/cli
cd npm/cli
sudo make install
That advice comes from of https://github.com/isaacs/npm#readme.
It is not as cute as curl|sh, but works.
Great news : npm now comes with nodejs !
I am a beginner~, but I want be helpful.
I use centos7, and do you know yum (a tool could download and setup programs like mirosoft Windows)
First, I search keyword "node.js" at wiki.centos, I find this. https://wiki.centos.org/SpecialInterestGroup/SCLo/CollectionsList?highlight=%28node.js%29.
There are two versions of nodejs could be used at the moment, I chose the higher one.
the URL is https://www.softwarecollections.org/en/scls/rhscl/rh-nodejs4/
and the command lines are below:
# Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl-rh
# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
# 2. Install the collection:
$ sudo yum install rh-nodejs4
# 3. Start using software collections:
$ scl enable rh-nodejs4 bash

Resources