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

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)

Related

CMake cannot find Qt5LinguistTools in Docker / Ubuntu 18.04

My simple Dockerfile:
FROM ubuntu:18.04
RUN apt update && apt upgrade -y
RUN apt install build-essential cmake qt5-default -y
RUN apt install qttools5-dev-tools -y
When I check linguist inside the container it's there:
root#9087245330a7:/# which linguist
/usr/bin/linguist
...but when I configure my app inside the container:
CMake Error at CMakeLists.txt:72 (find_package):
By not providing "FindQt5LinguistTools.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5LinguistTools", but CMake did not find one.
Could not find a package configuration file provided by "Qt5LinguistTools"
(requested version 5.5.1) with any of the following names:
Qt5LinguistToolsConfig.cmake
qt5linguisttools-config.cmake
Add the installation prefix of "Qt5LinguistTools" to CMAKE_PREFIX_PATH or
set "Qt5LinguistTools_DIR" to a directory containing one of the above
files. If "Qt5LinguistTools" provides a separate development package or
SDK, be sure it has been installed.
What is going on? This works on Ubuntu 16.04 just fine.
The problem was that in Ubuntu 18.04+ you need to install also qttools5-dev in order to get /usr/lib/x86_64-linux-gnu/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake.

getting "pygpu was configured but could not be imported" error while trying with OpenCL+Theano on AMD Radeon

I have followed the instructions from this:
https://gist.github.com/jarutis/ff28bca8cfb9ce0c8b1a
But then when I tried : THEANO_FLAGS=device=opencl0:0 python test.py
on the test file I am getting error:
ERROR (theano.sandbox.gpuarray): pygpu was configured but could not be imported
Traceback (most recent call last):
File "/home/mesayantan/.local/lib/python2.7/site-packages/theano/sandbox/gpuarray/init.py", line 20, in
import pygpu
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/init.py", line 7, in
from . import gpuarray, elemwise, reduction
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/elemwise.py", line 3, in
from .dtypes import dtype_to_ctype, get_common_dtype
File "/usr/src/gtest/clBLAS/build/libgpuarray/pygpu/dtypes.py", line 6, in
from . import gpuarray
ImportError: cannot import name gpuarray
I do not have good idea. I am using all these for the first time. I am working on Ubuntu 14.04 LTS. How can I resolve this error?
I fixed this issue with the step-by-step installation given in the lipgpuarray website!
Download
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
Install libgpuarray
# extract or clone the source to <dir>
cd <dir>
mkdir Build
cd Build
# you can pass -DCMAKE_INSTALL_PREFIX=/path/to/somewhere to install to an alternate location
cmake .. -DCMAKE_BUILD_TYPE=Release # or Debug if you are investigating a crash
make
make install
cd ..
Install pygpu
# This must be done after libgpuarray is installed as per instructions above.
python setup.py build
python setup.py install
Source:
http://deeplearning.net/software/libgpuarray/installation.html
This worked for me!
Good Luck
Installing the blas library seems enough. I'm doing tests for the same problem.
cd ~
git clone https://github.com/clMathLibraries/clBLAS.git
cd clBLAS/
mkdir build
cd build/
sudo apt-cache search openblas
sudo apt-get install libopenblas-base libopenblas-dev
sudo apt-get install liblapack3gf liblapack-doc liblapack-dev
cmake ../src
make
sudo make install
And after that
git clone https://github.com/Theano/libgpuarray.git
cd libgpuarray
mkdir Build
cd Build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
cd ..
sudo apt-get install cython
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
Building and Installing with regard to python3
python3 setup.py build
sudo -H python3 setup.py install
I hope it can help you. Now just the dev version of theano is missing for me.

Automator Shell Script- Sass Compiling Shell Script no longer works [duplicate]

I am not able to install and run fakes3 gem on El Capitan Beta 5.
I tried:
sudo gem install fakes3
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/fakes3
Then I tried doing it the cocoapods way. It worked for cocoapods but not for fakes3.
mkdir -p $HOME/Software/ruby
export GEM_HOME=$HOME/Software/ruby
gem install cocoapods
[...]
1 gem installed
gem install fakes3
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Disclaimer: #theTinMan and other Ruby developers often point out not to use sudo when installing gems and point to things like RVM. That's absolutely true when doing Ruby development. Go ahead and use that.
However, many of us just want some binary that happens to be distributed as a gem (e.g. fakes3, cocoapods, xcpretty …). I definitely don't want to bother with managing a separate ruby. Here are your quicker options:
Option 1: Keep using sudo
Using sudo is probably fine if you want these tools to be installed globally.
The problem is that these binaries are installed into /usr/bin, which is off-limits since El Capitan. However, you can install them into /usr/local/bin instead. That's where Homebrew install its stuff, so it probably exists already.
sudo gem install fakes3 -n/usr/local/bin
Gems will be installed into /usr/local/bin and every user on your system can use them if it's in their PATH.
Option 2: Install in your home directory (without sudo)
The following will install gems in ~/.gem and put binaries in ~/bin (which you should then add to your PATH).
gem install fakes3 --user-install -n~/bin
Make it the default
Either way, you can add these parameters to your ~/.gemrc so you don't have to remember them:
gem: -n/usr/local/bin
i.e. echo "gem: -n/usr/local/bin" >> ~/.gemrc
or
gem: --user-install -n~/bin
i.e. echo "gem: --user-install -n~/bin" >> ~/.gemrc
(Tip: You can also throw in --no-document to skip generating Ruby developer documentation.)
In my case, I had to re-install Ruby using Brew. That seems to have solved the problem as I can install gems again.
brew install ruby
After this, you need to log out and log back in, either graphically or just restarting your terminal.
That is because of the new security function of OS X "El Capitan".
Try adding --user-install instead of using sudo:
$ gem install *** --user-install
For example, if you want to install fake3 just use:
$ gem install fake3 --user-install
sudo gem install -n /usr/local/bin cocoapods
Try this. It will definately work.
You have to update Xcode to the newest one (v7.0.1) and everything will work as normal.
If after you install the newest Xcode and still doesn't work try to install gem in this way:
sudo gem install -n /usr/local/bin GEM_NAME_HERE
For example:
sudo gem install -n /usr/local/bin fakes3
sudo gem install -n /usr/local/bin compass
sudo gem install -n /usr/local/bin susy
Looks like when upgrading to OS X El Capitain, the /usr/local directory is modified in multiple ways :
user permissions are reset (this is also a problem for people using Homebrew)
binaries and symlinks might have been deleted or altered
[Edit] There's also a preliminary thing to do : upgrade Xcode...
Solution for #1 :
$ sudo chown -R $(whoami):admin /usr/local
This will fix permissions on the /usr/local directory which will then help both gem install and brew install|link|... commands working properly.
Solution to #2 :
Ruby based issues
Make sure you have fixed the permissions of the /usr/local directory (see #1 above)
First try to reinstall your gem using :
sudo gem install <gemname>
Note that it will install the latest version of the specified gem.
If you don't want to face backward-compatibility issues, I suggest that you first determine which version of which gem you want to get and then reinstall it with the -v version. See an exemple below to make sure that the system won't get a new version of capistrano.
$ gem list | grep capistrano
capistrano (3.4.0, 3.2.1, 2.14.2)
$ sudo gem install capistrano -v 3.4.0
Brew based issues
Update brew and upgrade your formulas
$ brew update
$ brew upgrade
You might also need to re-link some of them manually
$ brew link <formula>
As it have been said, the issue comes from a security function of Mac OSX since "El Capitan".
Using the default system Ruby, the install process happens in the /Library/Ruby/Gems/2.0.0 directory which is not available to the user and gives the error.
You can have a look to your Ruby environments parameters with the command
$ gem env
There is an INSTALLATION DIRECTORY and a USER INSTALLATION DIRECTORY. To use the user installation directory instead of the default installation directory, you can use --user-install parameter instead as using sudo which is never a recommanded way of doing.
$ gem install myGemName --user-install
There should not be any rights issue anymore in the process. The gems are then installed in the user directory : ~/.gem/Ruby/2.0.0/bin
But to make the installed gems available, this directory should be available in your path. According to the Ruby’s faq, you can add the following line to your ~/.bash_profile or ~/.bashrc
if which ruby >/dev/null && which gem >/dev/null; then
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
Then close and reload your terminal or reload your .bash_profile or .bashrc (. ~/.bash_profile)
This is the solution that I have used:
Note: this fix is for compass as I wrote it on another SO question, but I have used the same process to restore functionality to all terminal processes, obviously the gems you are installing are different, but the process is the same.
I had the same issue. It is due to Apple implementing System Integrity Protection (SIP). You have to first disable that...
Reboot in recovery mode:
Reboot and hold Command + R until you see the apple logo.
Once booted select Utilities > Terminal from top bar.
type: csrutil disable
then type: reboot
Once rebooted
Open terminal back up and enter the commands:
sudo gem uninstall bundler
sudo gem install bundler
sudo gem install compass
sudo gem install sass
sudo gem update --system
The the individual gems that failed need to be fixed, so for each do the following:
On my machine this was the first dependency not working so I listed it:
sudo gem pristine ffi --version 1.9.3
Proceed through the list of gems that need to be repaired. In all you are looking at about 10 minutes to fix it, but you will have terminal commands for compass working.
Screenshot
If the gem you are trying to install requires xml libraries, then try this:
sudo gem install -n /usr/local/bin <gem_name> -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
Specifically, I ran into a problem while installing the nokogiri gem v 1.6.8 on OS X El Capitan
and this finally worked for me:
sudo gem install -n /usr/local/bin nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
To make sure you have libxml2 and libxslt installed, you can do:
brew install libxml2 libxslt
brew install libiconv
and then check to make sure you have xcode command line tools installed:
xcode-select --install
should return this error:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Reinstalling RVM worked for me, but I had to reinstall all of my gems afterward:
rvm implode
\curl -sSL https://get.rvm.io | bash -s stable --ruby
rvm reload
I ran across the same issue after installing El Capitan, I tried to install sass and compass into a symfony project, the following command returned the following error:
$ sudo gem install compass
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
So I then tried to install sass with:
$ sudo gem install sass
Got the same error message, after some googling I managed to install sass using the following command:
$ sudo gem install -n /usr/local/bin sass
The above worked for me with installing sass but did not work for installing compass. I read that someone somewhere had opened an instance of xcode then closed it again, then successfully ran the same command after which worked for them.
I attempted to open xcode but was prompted with a message saying that the version of xcode installed was not compatible with El Capitan.
So I then updated xcode from the app store, re-ran the following command which this time ran successfully:
$ sudo gem install -n /usr/local/bin compass
I was then able to run $ compass init
I now have all my gems working and can proceed to build some lovely sass stuff :)
I had to rm -rf ./vendor then run bundle install again.
You might have two options:
If you've installed ruby and rails, you can first try running the command:
rvm fix-permissions
You can uninstall ruby completely, and reinstall in your ~ directory aka your home directory.
If you're using homebrew the command is:
brew uninstall ruby
For rails uninstall without homebrew the command is:
rvm remove
This should reinstall the latest ruby by running command:
curl -L https://get.rvm.io | bash -s stable --rails<br>
Mac has 2.6.3 factory installed, and it's required... if not run this command:
rvm install "ruby-2.6.3"
and then:
gem install rails
You'll get a few error messages at the end saying you have to add some other bundles...
Just make sure you're in the home ~ directory when you're installing so the permissions won't be an issue, but just in case...
I again ran:
rvm fix-permissions
and:
rvm debug
which told me I had to download yarn, I didn't save the output for it. Basically I did whatever the prompt told me to do if it had to do with my OS.
-D
I don't like to install stuff with sudo.
once you start with sudo you can't stop..
try giving permissions to the Gems directory.
sudo chown -R $(whoami) /Library/Ruby/Gems/2.0.0
sudo chown -R $(whoami):admin /usr/local
That will give permissions back (Homebrew installs ruby there)

Clockworkmod Tether fails on "libncurses.so.5"

While trying to install the Clockworkmod Tether app on Linux, I get the following error;
adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
You need to install the 32-bit version of the ncurses library.
sudo apt-get update
sudo apt-get install lib32ncurses5

nginx install on linux

I downloaded nginx from it's site for linux(I use ubuntu 10.4).I extracted nginx-1.0.6.tar.gz and there was a configure file in that directory. So I entered "./configure" command in shell. It seemed to be configured right.After I entered "make" command ,It said this error:
make -f objs/Makefile
make[1]: Entering directory `/usr/local/nginx'
cd ./auto/lib/pcre/ \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: ./configure: not found
make[1]: *** [auto/lib/pcre//Makefile] Error 127
make[1]: Leaving directory `/usr/local/nginx'
make: *** [build] Error 2
what should I do now?
you have to install Dependencies .
generally these will be enough
libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
so you can first install them
sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
and then compile .. also make sure you run the make command as root.
The ./configure program of nginx wants to find either the shared libs to build nginx dynamicaly linked or the sources of openssl prce and zlib respectivly.
The obove mentioned error occurs when you invoke ../nginx/configure with the wrong options.
--with-pcre=/path/to/lib # where libpcre.a resides
--with-openssl=/path/to/lib # where libssl.a resides
--with-zlib=/path/to/lib # where libz.a resides
is wrong especially when ld.so has no idea about these libs
If you build a statically linked version of nginx
try instead
--with-pcre=/path/to/src/of/pcre
--with-openssl=/path/to/src/of/openssl
--with-zlib=/path/to/src/of/zlib
e.g.
--with-pcre=../pcre-8.36 --with-openssl=../openssl-1.0.2 --with-zlib=../zlib-1.2.8
Download PCRE from source
Unzip it (do not install)
Copy this path to configure (from Downloads folder)
./configure --with-pcre=/home/USER/DOWNLOADS/pcre-8.37/
Enter your nginx install directory - I solved this error by editing objs/Makefile and removing -Wall and -Werror params so it looks like this (second line):
CC = gcc
CFLAGS = -pipe -O -W -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -g
Also, running your ./configure should initiate a long procedure of verifications to ensure
that your system contains all the necessary components. If the configuration fails for any reason, check
less objs/autoconf.err
for more details. Any errors at configuration are usually based on missing dependencies for your configuration.
You didn't configure it right. Use these commands (in the nginx directory):
./configure --with-pcre=./auto/lib/pcre/ --with-zlib=./auto/lib/zlib/
./configure
make
sudo make install
Look for Ubuntu installation at http://wiki.nginx.org/Install.
Look for ubuntu/ centos installation at https://nodevine.com/library/installing-multiple-virtual-hosts-on-nginx-on-ubuntu-12-04-and-cent-os-6
We can now add the repository to install the latest version of nginx:
sudo add-apt-repository ppa:nginx/stable
Note: If this command still does not work (normally on 12.10), run the following command:
sudo apt-get install software-properties-common
This will add the repository to Ubuntu and fetches the repository's key. This is to verify that the packages have not been interfered with since they have been built.
Step Three - Updating the Repositories
After adding a new repository, you will need to update the list:
sudo apt-get update
Install nginx
To install nginx or update the version you already have installed, run the following command:
sudo apt-get install nginx
Check That Nginx is Running
You can check to see that nginx is running by either going to your VPS' IP address/domain, or typing in:
service nginx status
This will tell you whether nginx is currently running.
with a vps debian wheezy
I have to install a lot of tools in order to install nginx 1.2.9 :
apt-get install libpcre3 libpcre3-dev
apt-get install --reinstall zlibc zlib1g zlib1g-dev
apt-get install make
apt-get install sudo

Resources