Unable to generate any rpm with rpmbuild -ba option - rpmbuild

I have updated my spec file with
Source0: myagent.tar.gz
%prep
%setup -q
%build
I have redhart-rpm-config installed.
in my script that calls the RPMbuild command I have
created the tar.gz and placed it in rpmbuild/SOURCES dir ..
I have all my binaries in there as well..
Then I call the rpmbuild -ba myspec
WHat is it that I am missing? I am using Centos 6.4 with kernel 2.6.32-504
I do not see my rpms generated.

Related

ZSH: commands do not support robotframework installation i.e. pip install robotframework command not found

I am Mac User (Big Sur 11.2.3) and I changed the Terminal from bash to zsh. I had a really hard time to install pip and set up the Environment Path and when I came to the point to install robotframework and all the paraphernalia I get a command not found on zsh.
Has someone sorted this out?
~ % pip install robotframework
zsh: command not found: pip
Are you using Python3 (which is installed on MacOS BigSur) to install roboframework?
Check path: which pyhton3
PIP-version: python3 -m pip --version
You can change shells zhs/bash/... for you install session, if that helps (to follow the roboFW install-guides).
zsh: command not found: pip means that the dir containing pip is not in your $path. There's probably something you forgot to copy from your .bashrc file to your .zshrc file. If you're using PyEnv to manage your Python versions (and you should!), then this is the line in question:
eval "$(pyenv init -)"

Bash on Ubuntu on Windows, Run Linux Commands to Install a Windows Program

I am new to Linux, but I am having a lot of trouble installing an R package that does not have windows binaries. I would rather not install a full Linux install and move everything. Judging by Windows Interoperability it seems like this should be possible.
I want to do any one of the options from the GNU R package cplexAPI documentation below in the block quote. I have tried:
C:\Users\zejas>bash
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ R CMD INSTALL cplexAPI_1.3.2.tar.gz
The program 'R' is currently not installed. You can install it by typing:
sudo apt-get install r-base-core
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$
Based on the example:
$/mnt/c/Windows/System32/notepad.exe
I have tried:
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ $/mnt/C/Program Files/Microsoft/MRO-3.3.1/bin
bash: $/mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ /mnt/C/Program Files/Microsoft/MRO-3.3.1/bin
bash: /mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ /mnt/C/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: /mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ $/mnt/C/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: $/mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ C/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ $/mnt/C/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: $/mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ /mnt/C/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: /mnt/C/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ /mnt/c/Program Files/Microsoft/MRO-3.3.1/bin/R.exe
bash: /mnt/c/Program: No such file or directory
zejas#DESKTOP-JASON:/mnt/c/Users/zejas$ /mnt/c/Windows/System32/notepad.exe
bash: /mnt/c/Windows/System32/notepad.exe: cannot execute binary file: Exec format error
Any ideas?
----------------------------------------------------------------------------
Linux and MacOS X installation
----------------------------------------------------------------------------
The locations of the CPLEX callable library and the CPLEX include
directory can be found in /README.html>, where
is the CPLEX installation directory. Also have a look at the
variables CLNFLAGS and COPT in the example Makefile of your CPLEX
installation. There, the variable CPLEXLIBDIR points to the callable
library directory.
There are several ways of installing the cplexAPI package:
1) Set variables PKG_CFLAGS, PKG_CPPFLAGS and PKG_LIBS directly, e.g.:
R CMD INSTALL --configure-args =" \ PKG_CFLAGS='-m64 -fPIC' \
PKG_CPPFLAGS='-I/cplex/include' \
PKG_LIBS='-L${CPLEXLIBDIR} -lcplex -m64 -lm -pthread'" \
cplexAPI_x.x.x.tar.gz
PKF_CFLAGS is optional, but both PKG_CPPFLAGS and PKG_LIBS must be
given.
2) Use --with-cplex-:
--with-cplex-include=PATH with PATH being the include directory
of CPLEX
--with-cplex-lib=PATH with PATH being the directory
containing the
callable library of CPLEX.
R CMD INSTALL --configure-args=" \
--with-cplex-include=/path/to/include/dir \
--with-cplex-lib=/path/to/lib/dir" cplexAPI_x.x.x.tar.gz
When using --with-cplex-, both arguments --with-cplex-lib and
--with-cplex-include must be given.
--with-cplex-link=-l... libraries to path to the linker during
compilation.
If --with-cplex-link is not given, '-lcplex -lm -pthread' will be
used as default.
--with-cplex-cflags=... optional CFLAGS
A further argument can be used in order to use the debuging
routines included in the C API of CPLEX:
--with-cplex-check=PATH with PATH being the directory
containing the
file check.c from the CPLEX examples directory.
R CMD INSTALL --configure-args=" \
--with-cplex-lib='/path/to/lib/dir' \ --with-cplex-include='/path/to/include/dir' \ --with-cplex-link='-lcplex -m64 -lm -pthread' \ --with-cplex-cflags='-m64 -fPIC' \ --with-cplex-check='/path/to/examples/dir/examples/src/c'" \ cplexAPI_x.x.x.tar.gz
3) Give the location of the CPLEX installation:
--with-cplex-dir=PATH
with PATH being the CPLEX directory. This is not the CPLEX installation directory , it is the directory including
the lib/ include/ and examples/ directory. Usually this is
/cplex.
R CMD INSTALL --configure-args="
--with-cplex-dir='/cplex'" \ cplexAPI_x.x.x.tar.gz
This procedure will take the first system type and library format
it finds. Information reqired for the compilation is taken from the
example Makefile.
4) Give no information:
R CMD INSTALL cplexAPI_x.x.x.tar.gz
This procedure will try to find the CPLEX interactive optimizer, or the CPLEX_BIN environment variable pointing to the
CPLEX interactive optimizer will be used. The directory two levels
above is used as CPLEX directory, all other information is taken
from teh CPLEX example Makefile as in #3 above.
First, to access a path with spaces in it, use double quotes:
"/mnt/c/Program Files/Microsoft/MRO-3.3.1/bin/R.exe"
Second, you can only run Windows programs from bash if you have build 14951 of Windows 10 or later. This is noted at the top of the MSDN page you linked to:
The Windows Subsystem for Linux can invoke native Windows binaries and be invoked from a Windows command line. This feature is available to Windows 10 users running Anniversary Update build 14951.
This build is still in Windows Insider release, so isn't generally available yet (latest GA is build 14393 as of 16 Jan 2017). For now, you can install cbwin if you want this functionality.
Third, running R from a Linux shell won't magically solve the reason why a precompiled binary package isn't available: cplexAPI depends on the CPLEX Studio application from IBM, and you still need to have this available for the R package to work. Assuming you do have this available, you can download the cplexAPI source and compile the package from Windows, without touching the bash shell.

Install R from source

I'm trying to install R from source in my home directory on a server running CentOS.
I do not have root rights, and I'm not permitted to write to `usr/local/include/'.
I use the following code:
wget http://cran.rstudio.com/src/base/R-3/R-3.2.0.tar.gz
tar xvf R-3.2.0.tar.gz
cd R-3.2.0
./configure --prefix=$HOME/R
In configuration step, I get error
configure:error:--with-readline=yes (default) and headers/libs are not available
In my understanding, it tells me that readline library is not available.
So I try to install readline.
I downloaded tar.gz file. and then I use the following command
tar xvf readline-6.3.tar.gz
cd readline-6.3
./configure --prefix=$HOME/readline
make
make install
Things are fine, and there's an additional folder in my home directory named "readline".
When I go back and try to configure R again, I still get the same error message. How can I fix it?
Try using these flags for your ./configure script
CXXFLAGS="-ggdb -pipe -Wall -pedantic -I/path/readline/6.3/include"
CPPFLAGS="-I/path/readline/6.3/include"
LDFLAGS="-L/path/readline/6.3/lib"
Then if you get an error about X11, set --with-x=no and try again.

Cloudbees dev cloud + Capybara-webkit(Qt) how to use?

I want to run capybara-webkit in cloudbees, but I met this error in bundle
SocketCommand.h:4:19: fatal error: QObject: No such file or directory
compilation terminated.
I want to install Qt.
$ sudo apt-get install libqt4-dev
sudo: no tty present and no askpass program specified
$ apt-get install libqt4-dev
apt-get: command not found
How to install Qt? jenkins-plugin?
QT libraries are already installed on DEV#Cloud slaves,
to install capybara gem, you need to set
QMAKE=/usr/bin/qmake-qt4
then run cloudbees ruby add-on script
curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
RUBY_VERSION=1.9.3-p327
source ./use-ruby
and setup your build script to install dependencies
gem install --conservative bundler
bundle install
(or equivalent)

Compile OpenCV 2.4.2 for Debian Lenny

To keep the Q&A aspect:
I got a strange problem with the latest (v.2.4.2) OpenCV version, which failed to install with the following error:
In file included from /OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37:1:
warning: missing terminating " character In file included from
/OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37: error:
missing terminating " character
So what went wrong? Take a look at my answer.
As mentioned in this bug report the problem is an old version (2.8.2) of cmake. So the solution was to grab a fresh copy of the cmake source, compile it and use it to install OpenCV.
Note 18/09/2012: This also works on Ubuntu 12.04 with cmake 2.8.9!
# get the cmake src
wget http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
# extract archive
tar xfvz cmake-2.8.8.tar.gz
# build the new version
cd cmake-2.8.8
cmake .
make
sudo make install
# get the OpenCV src
wget -O OpenCV-2.4.2.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.2/OpenCV-2.4.2.tar.bz2/download
# extract it …
tar -xvf OpenCV-2.4.2.tar.bz2
# build it
mkdir build
cd build
/usr/local/bin/cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
# setup OpenCV
sudo echo “/usr/local/lib” >> /etc/ld.so.conf
sudo ldconfig
That's it.
Unfortunately newer cmake depends on newer cmake than the outdated cmake 2.6-patch 0 in lenny. To compile cmake 2.8.8 as mentioned above, first you have to compile CMake 2.6.3 or above which builds with lenny outdated cmake 2.6-patch 0.

Resources