Tuesday, December 23, 2014

Installing libgroove and nodejs groove module in Raspbian

As we are working on small internal hobby project turning the Raspberry PI into a music box, I came across the need for building the nodejs groove module which requires a pretty big amount of effort. I'm going to provide you with the instruction for building from source.

UPDATE: If using testing/unstable repo is not a problem for you, an alternative method is available and is much faster by using binary packages. Jump to the "Install using testing/unstable binary packages"  section.

Install from source

This is the shorten version of the build script for Raspbian Wheezy that I think it may be useful for other ones struggling with a similar task.

Note: this is the simplified version of a great guide created by Andrew Kelly: Turn Your Raspberry Pi Into a Music Player Server

# install tools and libs
sudo apt-get install cmake git screen
sudo apt-get install libchromaprint-dev libspeexdsp-dev libasound2-dev libmp3lame-dev libvorbis-dev

# install libebur128 from source
cd
git clone https://github.com/jiixyj/libebur128
cd libebur128/
mkdir build
cd build/
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
sudo make install
sudo mv /usr/local/lib/arm-linux-gnueabihf/* /usr/local/lib/
sudo rmdir /usr/local/lib/arm-linux-gnueabihf
sudo ldconfig

# install SDL2 from source
cd
wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar xvf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3/
./configure --enable-audio --disable-video --disable-render --disable-events --disable-joystick --disable-haptic --disable-power --disable-file --disable-timers --disable-loadso --disable-cpuinfo
make
sudo make install

# install libav from source, will takes about 9hrs (!), consider using 'screen'
cd
wget http://www.libav.org/releases/libav-10.1.tar.gz
tar xvf libav-10.1.tar.gz
cd libav-10.1/
./configure --enable-shared --enable-debug --disable-static --enable-gpl --enable-libmp3lame --enable-libvorbis
make
sudo make install
sudo ldconfig

# install libgroove from source
cd
git clone https://github.com/andrewrk/libgroove
cd ~/libgroove/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
sudo make install
sudo ldconfig
ls /usr/local/lib/

#install newer nodejs ARM, this is optional
get https://github.com/needforspeed/Nodejs-ARM-builder/raw/master/v0.10.33/nodejs_0.10.33-armv6_armhf.deb
sudo dpkg -i nodejs_0.10.33-armv6_armhf.deb
which node


#install nodejs groove
npm install groove -g

Install from testing/unstable binary packages

At the time of writing, the testing repository of Raspbian contains a usable set of binary packages that are sufficient for installing node groove module.

Step 1: switch to testing

Edit the /etc/apt/sources.list to replace wheezy with testing, so that the first line of the file reads:

deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi

Step 2: update and install the libraries

sudo apt-get update
sudo apt-get install libgroove4 libgroove-dev libgroovefingerprinter4 libgroovefingerprinter-dev libgrooveloudness4 libgrooveloudness-dev libgrooveplayer-dev libgrooveplayer4

Step 3: install node groove module

npm install groove -g


1 comment:

mid said...

Mình đã tìm thấy các thông tin cần thiết ở đây, cảm ơn bạn. Mình cũng muốn giới thiệu về một Công ty dịch thuật uy tín - Công ty dịch thuật miền trung - MIDtrans , trụ sở chính chính tại địa chỉ 02 Hoàng Diệu, TP Đồng Hới, tỉnh Quảng Bình có Giấy phép kinh doanh số 3101023866 cấp ngày 9/12/2016 là đơn vị chuyên cung cấp dịch vụ dịch thuật, phiên dịch dành các cá nhân. Hệ thống thương hiệu và các Công ty dịch thuật con trực thuộc: dịch thuật vũng tàu - dịch thuật miền trung tại địa chỉ 110 Trân Hưng Đạo TP Bà Rịa là địa chỉ chuyên cung cấp dịch vụ dịch thuật công chứng tại Bà Rịa, Vũng Tàu ; văn phòng dịch thuật sài gòn 247 , địa chỉ 47 Điện Biên Phủ, Phường Đakao, Quận 1 TP HCM, dịch thuật buôn đăk nông : địa chỉ 100 , Lê lợi, TP đăk nông là nhà cung ứng dịch vụ dịch thuật uy tín hàng đầu tại đăk nông; vietnamese translation : dịch vụ dịch thuật cho người nước ngoài có nhu cầu, giao diện tiếng Anh dễ sử dụng; dịch thuật công chứng bình tân: nhà cung ứng dịch vụ dịch vụ dịch thuật phiên dịch hàng đầu tại Quận bình tân, TP HCM; dịch thuật đà nẵng : Địa chỉ 54 Đinh Tiên Hoàng, Quận Hải Châu, TP Đà Nẵng chuyên cung cấp dịch vụ dịch thuật công chứng, dịch thuật chuyên ngành tại Đà Nẵng; dịch thuật hà nội midtrans : địa chỉ 101 Láng Hạ, Đống Đa, Hà Nội là nhà cung ứng dịch vụ biên dịch, phiên dịch chuyên nghiệp tại địa bàn Hà Nội. Chúng tôi chuyên cung cấp các dịch vụ biên dịch và phiên dịch, dịch thuật công chứng chất lượng cao hơn 50 ngôn ngữ khác nhau như tiếng Anh, Nhật, Hàn, Trung, Pháp, Đức, Nga, Tây Ban Nha, Bồ Đào Nha, Ý, Ba Lan, Phần Lan, Thái Lan, Hà Lan, Rumani, Lào, Campuchia, Philippin, Indonesia, La Tinh, Thụy Điển, Malaysia, Thổ Nhĩ Kỳ..vv... Dịch thuật MIDtrans tự hào với đội ngũ lãnh đạo với niềm đam mê, khát khao vươn tầm cao trong lĩnh vực dịch thuật, đội ngũ nhân sự cống hiến và luôn sẵn sàng cháy hết mình. Chúng tôi phục vụ từ sự tậm tâm và cố gắng từ trái tim những người dịch giả.Tự hào là công ty cung cấp dịch thuật chuyên ngành hàng đầu với các đối tác lớn tại Việt nam trong các chuyên ngành hẹp như: y dược (bao gồm bệnh lý), xây dựng (kiến trúc), hóa chất, thủy nhiệt điện, ngân hàng, tài chính, kế toán. Các dự án đã triển khai của Công ty dịch thuật chuyên nghiệp MIDtrans đều được Khách hàng đánh giá cao và đạt được sự tín nhiệm về chất lượng biên phiên dịch đặc biệt đối với dịch hồ sơ thầu , dịch thuật tài liệu tài chính ngân hàng, dịch thuật tài liệu y khoa đa ngữ chuyên sâu. Đó là kết quả của một hệ thống quản lý chất lượng dịch thuật chuyên nghiệp, những tâm huyết và kinh nghiệm biên phiên dịch nhiều năm của đội ngũ dịch giả của chúng tôi. Hotline: 0947688883. email: info@dichthuatmientrung.com.vn . Các bạn ghé thăm site ủng hộ nhé. Cám ơn nhiều