How to install ncurses on raspberry Pi? - terminal

How can I install the ncurses library on a raspberry Pi through the terminal?
Is there a sudo function that can be used to install it?

To install the NCurses library on a Debian based machine you can issue the apt-get command below:
sudo apt-get install libncurses5-dev libncursesw5-dev
This will install both the libncurses5-dev (for ncurses) and libncursesw5-dev (for ncursesw) on your machine.

Related

R-studio installation for ubuntu 16.04 32-bit

I have problems with R-studio installation for Ubuntu 16.04 32-bit. I found out a reason for my problem here - https://mikewilliamson.wordpress.com/2016/11/14/installing-r-studio-on-ubuntu-16-10/. But the script examples are for 64-bit machine and I don't quite understand how I can change them for my 32-bit machine.
Does somebody had the same problems? How did you solve it?
o Install R 3.4.1 and Rstudio on ubuntu 16.04 LTS on 32 bit machine :
Carry out following steps :
cd $HOME
wget https://cran.rstudio.com/src/base/R-3/R-3.4.1.tar.gz
tar xvf R-3.4.1.tar.gz
cd R-3.4.1
sudo apt-get install gcc fort77 aptitude
sudo aptitude install g++
sudo aptitude install xorg-dev
sudo aptitude install libreadline-dev
sudo aptitude install gfortran
gfortran --version
sudo apt install libpcre3-dev liblzma-dev libbz2-dev
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
sudo apt-get install texlive-base
sudo apt-get install texinfo
sudo apt-get install texlive-fonts-extra
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libcairo2-dev libpng-dev zlib1g-dev libpixman-1-dev libxt-dev
java -version
need to build shared library (--enable-R-shlib)
the --enable-R-shlib option is needed for the RStudio IDE to work
sudo ./configure --enable-R-shlib
sudo make
sudo make install
R --version
cd $HOME
rm R-3.4.1.tar.gz
sudo rm -rf R-3.4.1
Only one warning is shown during compilation:
main.c: In function ‘dummy_ii’:
main.c:1669:12: warning: function returns address of local variable [-Wreturn-local-addr]
return (uintptr_t) ⅈ
^
Now you can install Rstudio (here for a 32 bits system; choose the correct one for you here https://www.rstudio.com/products/rstudio/download/):
sudo apt-get install gdebi-core
wget https://download1.rstudio.org/rstudio-1.0.143-i386.deb
sudo gdebi -n rstudio-1.0.143-i386.deb
rm rstudio-1.0.143-i386.deb
To know if you have a 32-bits or 64-bits system, enter:
uname -a
The machine hardware name lists whether your system is 32-bit (“i686” or “i386”) or 64-bit (“x86_64”).
For further details refer the link :
https://biostatsr.blogspot.in/2017/06/install-r-340-and-rstudio-on-ubuntu.html
It seems current versions of RStudio in Ubuntu 16.04 are not supported for 32-bit. So I enabled i386 architecture (https://blog.teststation.org/ubuntu/2016/05/12/installing-32-bit-software-on-ubuntu-16.04/) in order to install previous Ubuntu 32-bit versions.
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libstdc++6:i386
Then I was able to install RStudio 1.1.442 - Ubuntu 12.04-15.10/Debian 8 (32-bit) (https://download1.rstudio.org/rstudio-1.1.442-i386.deb). It worked for my Xubuntu 16.04 (32-bit)

Can't install cuDNN 5.1.5 with CUDA 8.0 and Tensorflow 0.12 on g2.2xlarge instance

The steps I've taken are below. During the ./configure step, unless I allow the system default for the cuDNN version (v5) instead of specifying v5.1.5 (as I want), I get an error saying that the environment version (v5) for cuDNN doesn't match the target version (5.1.5). Since I have downloaded the cuDNN v5.1.5 file for CUDA 8.0 from Nvidia I'm baffled.
What's more, after digging through https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/cuda_configure.bzl around line 240, I'm seeing that the version the bazel configure script checks against seems to only take into account the Major numeral of the cuDNN version (my Major, Minor and Patch numerals within cudnn.h are 5, 1, 5 respectively). So, I'm uncertain as to how it would ever allow version 5.1.5 to be installed. Maybe I'm looking at it wrong?
In any case, does anyone have a method of installing cuDNN 5.1.5 with CUDA 8.0 and Tensorflow 0.12 on a g2.2xlarge instance?
Thanks!
Steps
(Note: these work, but it installs cuDNN 5.0, not 5.1.5 as desired)
Provisioning
follow provisioning steps from: https://medium.com/#giltamari/tensorflow-getting-started-gpu-installation-on-ec2-9b9915d95d6f#.2hv67eeek
(i.e. up to but not including: sudo apt-get update && sudo apt-get -y upgrade)
Installing dependencies and tools
familiarize self with:
http://expressionflow.com/2016/10/09/installing-tensorflow-on-an-aws-ec2-p2-gpu-instance/
http://ramhiser.com/2016/01/05/installing-tensorflow-on-an-aws-ec2-instance-with-gpu-support/
https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0-rc/
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python-matplotlib libblas-dev liblapack-dev libatlas-base-dev python-dev python-pydot linux-headers-generic linux-image-extra-virtual unzip python-numpy swig python-pandas python-sklearn unzip wget pkg-config zip g++ zlib1g-dev libcurl3-dev
sudo pip install -U pip
Installing Cuda 8
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
rm cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
sudo apt-get update
sudo apt-get install -y cuda
Installing cuDNN
We want to download and install latest version of cuDNN. Downloading cuDNN requires logging into NVIDIA developer site, so we can’t use wget to fetch the files. Download the following files from NVIDIA and upload them to your AWS instance.
download cuDNN 5.1 for CUDA 8.0 on linux
scp -i ssh-key.pem path/to/downloaded/cudnn ubuntu#ec2{instance}.us-west-1.compute.amazonaws.com:~/
sudo tar -xzvf cudnn-8.0-linux-x64-v5.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
Configure the Environment
put following at end of ~/.bashrc:
export CUDA_HOME=/usr/local/cuda
export CUDA_ROOT=/usr/local/cuda
export PATH=$PATH:$CUDA_ROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/lib64:$CUDA_ROOT/extras/CUPTI/lib64
source ~/.bashrc
sudo reboot
Installing Bazel
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf- set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf- set-selections
sudo apt-get install -y oracle-java8-installer
sudo apt-get install pkg-config zip g++ zlib1g-dev
scp https://github.com/bazelbuild/bazel/releases/download/0.3.2/bazel-0.3.2-installer-linux-x86_64.sh from local machine to ec2 instance
chmod +x bazel-0.1.4-installer-linux-x86_64.sh
./bazel-0.1.4-installer-linux-x86_64.sh --user
rm bazel-0.1.4-installer-linux-x86_64.sh
bazel version
Building and Installing Tensorflow
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
TF_UNOFFICIAL_SETTING=1 ./configure
hit enter/default for all except:
CUDA version = 8.0, CUDA dependency = 3.0 (k520 gpu)
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
sudo pip install --upgrade /tmp/tensorflow_pkg/tensorflow-0.12.0rc1-cp27-cp27mu-linux_x86_64.whl

Installation of Rstudio for ubuntu

I want to install Rstudio for ubuntu, so I used the link https://www.rstudio.com/products/rstudio/download/ after that I choosen RStudio 0.99.893 - Ubuntu 12.04+/Debian 8+ (64-bit) then I opened with Ubuntu software center. In that I clicked the install button I got error box like this,
Requires installation of untrusted packages
This requires installing packages from unauthenticated sources.
How to solve this problem?
The unauthenticated package required by RStudio is libjpeg62, so install the package separately and then install rstudio from software center
In the terminal run the following for installing libjpeg62
sudo apt-get install --allow-unauthenticated libjpeg62
Then go back to installing rstudio.
Note: you need to install r interpretor along with rstudio this you can do by following
sudo apt-get install r-base
# Install R and RStudio on Ubuntu 14.04
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
# Download and Install RStudio
sudo apt-get install gdebi-core
wget https://download1.rstudio.org/rstudio-1.0.44-amd64.deb
sudo gdebi rstudio-1.0.44-amd64.deb
Runs following commands :
In order to install RStudio on Ubuntu 18.04 we will first need to install the r-base package. Open up terminal and enter:
$ sudo apt update
$ sudo apt -y install r-base
To install DEB file on Ubuntu Linux is by using the gdebi command.
In case gdebi is not available on your system you can install it by executing the bellow command:
$ sudo apt install gdebi-core
All Package(builds) are available : in this link or link. You can select different package.
I had download and install : rstudio-xenial-1.1.463-amd64.deb build(package) from above in this link.
$ wget https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-xenial-1.1.463-amd64.deb
$ sudo gdebi rstudio-xenial-1.1.463-amd64.deb
To Start R-Studdio from following command :
$ rstudio

LTTng and Babeltrace python bindings never enabled

I have installed LTTng and Babeltrace followed by the instructions of
sudo apt-get install lttng-tools
sudo apt-get install lttng-modules-dkms
sudo apt-get install liblttng-ust-dev
sudo apt-get install babeltrace
but the python bindings never work, when i try to import python modlues.
any idea about how to use it?
The python bindings are packaged separately, in the "python3-babeltrace" package. On Ubuntu it's only available since 14.10. If you are on a previous version you can use the LTTng PPA to get it.

how to install apt-get, raspbian

I am doing host target development within scratchbox. And apt-get is not installed in my target raspbian rootfile system.
What is the right apt-get package to use from here for raspbian ?
http://www.apt-get.org/main/
Should i use wget command for .deb package of apt-get ?
http://www.cyberciti.biz/tips/linux-wget-your-ultimate-command-line-downloader.html
http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/#more-1885
dpkg is installed in root filesystem of my target, i have checked it using whereis command
Please suggest, or can you suggest some link for installing apt-get itself. I am not able to find something related to it.
Any reply will be appreciable.
Looks like maybe debian apt package will get you there. I thought apt was just ubuntu but no.
The Raspbian FAQ is here: http://www.raspbian.org/RaspbianFAQ
In it you can grab a list of apps included in Rasbian:
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages
You can grab the Raspbian package archive here:
http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages.gz
Extract it, then use dpkg to install apt-get.
Install Putty.exe and login with putty to your raspbian with ip-adress of your raspbian and you can install apt-get!
Install the following:
sudo apt-get update;
sudo apt-get install gcc;
sudo apt-get install autoconf;
sudo apt-get install libtool;
sudo apt-get install pkg-config;
sudo apt-get install libselinux1-dev;
sudo apt-get install liblockdev1-dev;
sudo apt-get install gawk;
sudo apt-get install g++;
sudo apt-get install c++;
sudo apt-get install libgudev-1.0-dev;
sudo apt-get install libudev-dev;
mkdir -p $HOME/distr/libcec;
wget -P $HOME/distr/libcec https://github.com/Pulse-Eight/libcec/archive/master.zip;
unzip $HOME/distr/libcec/master.zip -d $HOME/distr/libcec/;
cd $HOME/distr/libcec/libcec-master ./bootstrap;"
./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi;
make;
sudo make install;
sudo apt-get install cec-utils;
sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot
After the reboot, is everything up-to-date and you have no problems anymore!

Resources