I'd want to install some libraries in order to connect a Kinect 360 in a Raspberry following this link: http://www.kdab.com/setting-up-kinect-for-programming-in-linux-part-1/
First, I checked this on Ubuntu and all was fine.
However, when I want to build libfreenect (with make) this error is shown:
../lib/libfreenect.so.0.5.2: undefined reference to 'lisusb_get_parent'
collect2: ld returned 1 exit status
I'm new on Raspberry and I don't know how to fix this.
Any help is appreciated!! :)
Thanks!
I ran into the same problem, starting from a fresh install of Raspbian 2015-02-16. Apparently (based on this), the version of libusb you get with apt-get is old. My workaround, based on recommendations from that link and elsewhere, is to build libusb from the more recent sources and convince libfreenect to use that:
Grab the packages you'll need to compile libusb and libfreenect:
sudo apt-get install git cmake build-essential
sudo apt-get install freeglut3-dev libxmu-dev libxi-dev
sudo apt-get install libudev-dev
Remove the existing libusb, if it's there:
sudo apt-get remove libusb-1.0-0-dev
Grab the sources for libusb-1.0.18:
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.18/libusb-1.0.18.tar.bz2
tar -xvf libusb-1.0.18.tar.bz2
Build and install the updated libusb:
cd libusb-1.0.18/
./configure --prefix=/usr --disable-static
make
sudo make install
Ugly hack to convince libfreenect to use the new libusb library:
sudo ln -s /usr/lib/libusb-1.0.so /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
Then you should be able to build libfreenect.
sudo ln -s /usr/lib/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libusb-1.0.so
when u r using x86_64 machine
Related
I am new to kali linux and I try to find my way around it.. I have managed to install vmware workstation 12.1.1 but when I try to run it I get this error
A compatible version of gcc was not found. GNU C Compiler (gcc) version 5.4.0 was not found
I have the gcc 6.1.1 installed and spent 3 days trying to fix this with no result.. Any help?
Edit: I added another answer, that procedure worked for me.
Try running this:
sudo aptitude install gcc-4.3 make linux-headers-`uname -r` -y
and
sudo aptitude install libglib2.0-0
Did you fix it before i could respond? If you did, how did you?
Finally I found the solution here.
Upgrade Kali to the Latest Which is 4.8.0-kali1-amd64
apt upgrade
cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
tar xf vmnet.tar
cd vmmon-only
make
cd ../vmnet
make
cd ..
mkdir /lib/modules/`uname -r`/misc
cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko
cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko
depmod -a
/etc/init.d/vmware restart
I'm also hope that its will be helpful for someone.
This worked for me.
Remove gcc and add if you don't have the following lines to /etc/apt/sources.list
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb http://old.kali.org/kali sana main non-free contrib
deb http://old.kali.org/kali moto main non-free contrib
Then:
apt-get update
apt-get dist-update
Now install gcc-5
sudo apt-get install gcc-5
And the headers.
But remember: linux-headers-(Put here the output of uname -r)
apt-get install build-essential linux-headers-4.8.0-kali2-amd64
pip install m2crypto
Generates the following output:
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -I/usr/include/openssl -includeall -modern -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_m2crypto.i:30: Error: Unable to find 'openssl/opensslv.h'
SWIG/_m2crypto.i:33: Error: Unable to find 'openssl/safestack.h'
SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command 'swig' failed with exit status 1
I've run:
brew install swig
I wanted a nicer way without installing manually and using only Homebrew (which also does not link openssl by default). Also using pip was a requirement. This seems to work with newest m2crypto 0.22.5. I also tested it once with m2crypto 0.22.3 and seems also to work. The OpenSSL version here is 1.0.2d:
brew install openssl
brew install swig
Finally install m2crypto on macOS in your Bash. It is a long command but it changes SWIG and clang environment variables only during pip install so that m2crypto will get all OpenSSL requirements:
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
pip install m2crypto
btw. the last command also works if you use e.g. a requirements.txt.
Update:
Additional also the command for fish shell users...
env LDFLAGS="-L"(brew --prefix openssl)"/lib" \
CFLAGS="-I"(brew --prefix openssl)"/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I"(brew --prefix openssl)"/include" \
pip install m2crypto
thanks to therealmarv env flags i was able to get this to work with the macports version of openssl/swig, this is what i did:
sudo port install openssl
sudo port install swig
sudo port install swig-python
then use therealmarv lines but replace "$(brew --prefix openssl)" with the dir from macports which should be "/opt/local"
sudo env LDFLAGS="-L/opt/local/lib" \
CFLAGS="-I/opt/local/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I/opt/local/include" \
pip install M2Crypto
I just went through a lot of pain getting this working in El Capitan. Here is what I had to do:
Install OpenSSL (you have to use an older version, m2crypto will not compile otherwise)
curl -O https://www.openssl.org/source/openssl-0.9.8zg.tar.gz
tar -xvzf openssl-0.9.8zg.tar.gz
cd openssl-0.9.8zg
./Configure --prefix=/usr/local darwin64-x86_64-cc
make && make test
sudo make install
Install m2crypto
git clone https://github.com/martinpaljak/M2Crypto.git
cd M2Crypto
python setup.py build build_ext --openssl=/usr/local
sudo python setup.py install build_ext --openssl=/usr/local
AFAIK it is installed... I still have to do some testing though.
Got exact same issue on Ubuntu 18.04 LTS, while trying to execute
pip install M2Crypto==0.24.0
Did the following to get rid of it:
sudo apt-get install swig
sudo apt-get install libssl1.0-dev
This fixed my problem (Python 2.7):
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
macos v10.15.6
m2crypto v0.35.6
pip v20
Solution by therealmarv works,
If the program does not take effect, you can try to upgrade your brew packages. Before the solution.
brew update # update homebrew self
brew upgrade # upgrade all
sudo apt-get install python-m2crypto
I try to install ruby and rails to start to learn ruby on rails.
I work on Windows. After many search and tries, I gave up and installed a fresh ubuntu 14 x64 in a VirtualBox.
I installed ruby with apt-get, but its files get spread all over the file system (/bin, /var...). So, I have to use always sudo and search all over the place when installing gems.
I would like, just like in windows, find a ruby tar.gz which I can decompress in a folder of mine, with all files at the same place, where I have the "control" over the files, and I can watch easily what it's hapenning while installing gems, rails, etc...
The problem : I cannot find any tar.gz (or similar archive) of ruby for linux which I simply can uncompress in a folder and work with it (I can manage the $path). The only one I can find is for Windows !
Thanks !
It sounds like what you want is Ruby's source code. Go to https://www.ruby-lang.org/en/downloads/ and look under "Compiling Ruby - Source Code". That's where you'll find the .tar.gz files you want. You'll need to compile and install it before you can actually use it. Installing normally copies files "all over the file system", but you can force it to install to a specific folder by passing the --prefix option to the ./configure script.
$ tar -xf ruby-2.2.1.tar.gz
$ cd ruby-2.2.1
$ ./configure --prefix=/my/ruby/dir
$ make && make install
You may need to install some dev packages in order to get it to compile, but any compilation errors should make it clear what you need.
These instructions are also described here.
Thank you Max for your response.
In case someone else tries to compile ruby on a fresh new ubuntu, this is what I had to do to build and use it with success :
Install missing dependencies :
get the latest "Stable Snapshot" from https://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz and not the "Current stable"
sudo apt-get install libffi-dev
sudo apt-get install zlibc zlib1g zlib1g-dev
sudo apt-get install openssl
sudo apt-get install libssl0.9.8 [[[ first, find the latest version with : apt-cache search libssl | grep SSL ]]]
sudo apt-get install ca-certificates
sudo apt-get install libssl-dev
sudo apt-get install libreadline-dev
Then :
Edit downloaded file tools/rbinstall.rb, goto line 714 and correct the typo :
change "rescue LoadErroe" to "rescue LoadError" (not corrected in date of 20 March 2015).
Run Max's instructions above
Don't move the ruby destination folder declared with "--prefix" (even if you try to correct the shells in ruby/bin)
Finally, for using rails :
sudo apt-get install libsqlite3-dev
sudo apt-get install nodejs ==> inorder to have a js runtime
I'm hoping to get the CurveCP functionality working within ZeroMQ ØMQ. I'm using CentOS as the underlying OS.
After downloading and running ZeroMQ, I've done the usual ./configure, make and sudo make install. Then running make check returned many test passes, but stated:
libsodium not installed, skipping CURVE test
So sudo yum install libsodium and sudo ldconfig, then make clean, and the commands above. But next time I ran the make check, the CURVE test is skipped, again reporting no libsodium.
Looking at the tests, I see test_security_curve.cpp has #ifndef HAVE_LIBSODIUM and that preprocessor definition appears to be driving the 'no libsodium' skip.
./configure --with-libsodium as per this page reports libsodium is not installed
./configure --with-libsodium=/home/eng/work/libsodium-master --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64 reports libsodium is not installed.
Solution
In order to get this working, installing libsodium via YUM did not give a version of libsodium viable for a zeromq build. It needed a real build of libsodium, which in turn required a recent copy of autoconf.
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig
cd ../libsodium-master
./autogen.sh
./configure
make
sudo make install
cd ../libzmq-master
sudo ./configure --with-libsodium=/home/eng/work/libsodium-master --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64
sudo make
make check
sudo make install
I would like to install Zephir on my Ubuntu machine.
The goal is to convert some of my existing code into a PHP extension, in order to get the benefits of faster execution.
Any pointers are more than appreciated.
Install zephir in Ubuntu..
You need download Zephir-master from https://github.com/phalcon/zephir
You nedd download json-c from https://github.com/json-c/json-c
1) sudo apt-get install gcc make re2c phpX phpX-json phpx-dev libpcre3-dev
2) Open folder Json-c
2.1) sh autogen.sh
2.2) ./configure
2.3) make && make install
3) Open folder zephir-master
3.1) ./install -c
4) zephir help for to test the correct installation
Please note Zephir is currently in Alpha stage and therefore bugs can be expected.
You need to have certain packages installed:
json-c
re2c
In the command line type:
sudo apt-get install libjson0 libjson0-dev libjson0-dbg
sudo apt-get install re2c
Once you have the required packages installed, you can generate the parser as follows:
./generate
Compile the extension (this is your code):
./zephir
The code produced is placed in ext/, there you can perform the standard compilation:
cd ext/
sudo ./install