I can successfully build ninja locally in ~/programs in CentOS7 using the following set of commands:
mkdir -p programs
cd programs
git clone https://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
./ninja --version
1.11.1
However, I am trying to install it system-wide but it is only recognizable in ~/programs/ninja. Shouldn't ./configure.py --bootstrap install it automatically?
How can I install it in /usr/bin/ninja?
After build ninja move it to /usr/bin
mv ./ninja /usr/bin
Related
I was trying to install telegram bot api on my ssh server and I ran into a problem.
Operating system: Debian 11, Linux
Commands which I used:
su -
apt-get update.
apt-get upgrade.
apt-get install make git zlib1g-dev libssl-dev gperf cmake g++.
exit.
git clone --recursive https://github.com/tdlib/telegram-bot-api.git.
cd telegram-bot-api.
rm -rf build.
mkdir build.
cd build.
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. ..
cmake --build . --target install
cd ../..
ls -l telegram-bot-api/bin/telegram-bot-api*
Problem:
When I was running this command "cmake --build . --target install", my downloading stopped on 33% with this message:
"[ 33%] Building CXX object td/CMakeFiles/tdapi.dir/td/generate/auto/td/telegram/td_api.cpp.o"
I've tried twice, nothing happens after this, how do I fix this?
Commands from https://tdlib.github.io/telegram-bot-api/build.html?os=Linux
I've tried to run the whole code again, but the problem was the same. I'm not into linux, thats why I'm asking here
I want to build yocto sumo 2.5 for x86 Linux desktop. Does anyone have an idea or any documentation to do that ?.
Please familiar with this doc - Quick introduction to Yocto Project, which consist information how to start and where to go next.
meta-intel has "intel-core2-32" machine. you should use this or use qemux86.
edit your poky/build/local.conf file and set MACHINE to "intel-core2-32"
$ cd poky/
$ git clone -b sumo git://git.yoctoproject.org/meta-intel
$ source oe-init-build-env
$ bitbake core-image-minimal
1-) Install required packages
sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping
2-) Clone poky
git clone -b version git://git.yoctoproject.org/poky.git poky-version
cd poky-version
3-) Clone open embedded
git clone -b version git://git.openembedded.org/meta-openembedded
4-) Clone meta raspberrypi
git clone -b version git://git.yoctoproject.org/meta-raspberrypi
5-) Clone meta freescale
git clone -b version https://git.yoctoproject.org/git/meta-freescale
6-) Clone meta ti
git clone -b version git://git.yoctoproject.org/meta-ti
7-) Clone meta-qt4
git clone -b version git://git.yoctoproject.org/meta-qt4
8-) Clone meta-qt5
git clone -b version git://github.com/meta-qt5/meta-qt5.git
version : morty, rocko, sumo and so on...
PS: It works on the ubuntu 16.04. You can use these short guide and the packages can change according to linux OS.
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.
following thees steps to install node js from git . I am running kali linux 2016
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/joyent/node.git
cd node
./configure --prefix=~/local
make install
cd ..
git clone git://github.com/isaacs/npm.git
cd npm
make install # or `make link` for bleeding edge
I have not sucessfully installed npm. Becuase the error is that command
node
is not found. But i successfully installed node.
even echoed the path. What could be the problem
Using Pre-Compiled Binaries :
Download NodeJS v8.4.0 (x64 Linux)
extract .tar.xz > /opt/node (for example) and create a simbolic link for usage :
ln -s /opt/node/bin/node /usr/bin/node
ln -s /opt/node/bin/npm /usr/bin/npm
I'm trying to install Cppcheck via telnet on a Linux box. I have the cppcheck-1.67.tar file and I untar it. I don't see anything that will install it for me. Am I approaching this the correct way?
Actual on a date publication of this answer.
Download file from there https://sourceforge.net/projects/cppcheck/
Go to the folder with for downloads
cd ~/Downloads/
Unpack archive
tar -xvf cppcheck-1.76.1.tar.bz2
Go to unpacked folder
cd cppcheck-1.76.1/
Install package as root
sudo make install
Check up result
$ which cppcheck
/usr/bin/cppcheck
Testing it
$ touch simple.c
$ echo "int main(){ int a; a + 1; return 0}" > simple.c
$ cppcheck simple.c
Checking simple.c ...
[simple.c:1]: (error) Uninitialized variable: a
This package also exists in a standard repository.
$ aptitude search cppcheck
p cppcheck - tool for static C/C++ code analysis
Testing environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
The instructions are in the readme.txt file. The short answer is make install.
Remember never to install things from a tar file when you can use your distribution's package manager.
The readme.txt file makes no mention of "make install".
It looks like the supplied Makefile is borked:
It passes "CFG=" param to compile, without DESTDIR
But "make install" prepends DESTDIR to CFGDIR
In my case, I edited Makefile to remove DESTDIR from make install, and cppcheck is happy with that.
For me the magic lines turned out to be the following in Docker on Ubuntu 18.04 (Bionic Beaver):
RUN cd /tmp \
&& git clone https://github.com/danmar/cppcheck.git \
&& cd cppcheck \
&& git checkout 1.72 \
&& make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install \
&& cd /tmp \
&& rm -rf /tmp/cppcheck \
&& ldconfig
I assume the following will work for any version. I am not sure where it makes sense to install the configuration to. This works for me:
make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install
If you want a later version than in the other answers, and you want to install it, then you can use the bash script below which is up to date and builds on the other answers. It should also clean itself up afterwards. It works for version 2.7 on debian/ubuntu but you can change the git checkout tag and try your luck on newer versions.
installcppcheck.sh
#!/usr/bin/env bash
set -e
cd /tmp
git clone https://github.com/danmar/cppcheck.git
cd cppcheck
git checkout 2.7
make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
cd /tmp
rm -rf /tmp/cppcheck
ldconfig
cppcheck --version
If you don't have sudo privileges you can follow #Seti Volkylany's answer, replacing step 5 with
OUT_PATH=/home/user/bin # target location of binary
make SRCDIR=build CFGDIR=~/Downloads/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH
make install CFGDIR=$OUT_PATH/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH