My Debian 7 armel embedded system currently has g++ 4.6, and I'd like to upgrade to g++ 4.9 to use new C++11 features. How do I do that?
My current sources.list contents is:
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.us.debian.org/debian wheezy main non-free
deb-src http://ftp.us.debian.org/debian wheezy main non-free
A simple apt-get install of the package does not work:
root#arm:~# apt-get install g++-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package g++-4.9
E: Couldn't find any package by regex 'g++-4.9'
Another workaround could be to install the g++ 4.9 packages from "Jessie", according to this blog post. Briefly, you would have to tell APT to use the Jessie repos while you are installing the new G++. First bring the current Wheezy up-to-date:
sudo apt-get update
sudo apt-get upgrade
Then do a backup :-) and edit /etc/apt/sources.list so that you replace the string "wheezy" with "jessie":
sudo cp /etc/apt/sources.list /etc/apt/sources.list.WHEEZY
sudo vi /etc/apt/sources.list
Now update the package list and install the 4.9 version of GCC/G++:
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
After this revert to the "original" package list:
sudo cp /etc/apt/sources.list.WHEEZY /etc/apt/sources.list
sudo apt-get update
This leaves the original GCC,G++ in place. If you wish to compile with the 4.9 version, then either set the CC and CXX env vars accordingly or invoke the compilers as gcc-4.9 or g++-4.9 explicitly.
Probably-required: packaging-dev, ubuntu-dev-tools
Set up pbuilder
(this lets you build a package in a chroot without polluting your system with build-dependency packages)
sudo pbuilder create
if you want to build for a specific distribution, (pbuilder uses the build system release in a chroot) you can use pbuilder-dist [precise/oneric/trusy/etc...] create
Get debian source
pull-debian-source gcc-4.9 [4.9.0-6]
specific debian revision is optional, but can be useful if you want to pull experimental/unstable/testing/stable revisions
you can also pull from specific ubuntu distros by adding them to sources.list as a deb-src and using sudo apt-get src
Build Package
sudo pbuilder build gcc-4.9_4.9.0-6.dsc
In the files downloaded there is a .dsc file, for the most recent gcc it is gcc-4.9_4.9.0-6.dsc which is a package descriptor file. .orig.tar.[gz/xz] is the source tarball.
Create local Apt-repository
mkdir /convenient/place/for/repo
cp /var/cache/pbuilder/result/* /path/to/repo
cd /path/to/repo
apt-ftp archive packages . > Packages
sudo echo "deb [trusted=yes] file:/local/repo/Packages ./" > /etc/apt/sources.list.d/gcc-repo.list`
Note you can also do this step with .debs downloaded from anywhere (skip step 1-3)
Install
apt-get update; apt-get install gcc-4.9 g++-4.9
Instead of using the jessie packages, it would be better to check to see if it's been back-ported to wheezy. Add this to your /etc/apt/sources.list:
deb http://http.debian.net/debian wheezy-backports main
and do an apt-get update and see if you can install it then.
There is a gcc-4.9-backport now.
sudo apt-get update && sudo apt-get install gcc-4.9-backport
Related
I can't install chromium-chromedriver on my raspberry pi 4.
$ sudo apt-get install chromium-chromedriver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package chromium-chromedriver
$ cat sources.list
deb http://http.kali.org/kali kali-rolling main contrib non-free
# Additional line for source packages
deb http://security.debian.org/debian-security stretch/updates main
$ apt-get search chromedriver
E: Invalid operation search
$ apt search chromedriver
Sorting... Done
Full Text Search... Done
chromedriver/oldoldstable 72.0.3626.122-1~deb9u1 armhf
web browser - WebDriver support transitional package
ruby-chromedriver-helper/kali-rolling 2.1.0-7 all
Easy installation and use of chromedriver
Thank you in advance
Kali rolling is based on the latest stable version of Debian, which is currently Debian 11. The version of chromium-chromedriver that is compatible with Kali rolling is available from the default software repositories of Ubuntu 21.10 which is also based on Debian 11. To install chromium-chromedriver in Kali Linux open the terminal and type:
sudo apt update
wget http://mirrors.kernel.org/ubuntu/pool/universe/c/chromium-browser/chromium-chromedriver_85.0.4183.83-0ubuntu2_amd64.deb
sudo apt install ./chromium-chromedriver_85.0.4183.83-0ubuntu2_amd64.deb
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
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
I'm trying to install java 8 on cloud9 through the webupd8 PPA. So I'm adding the repository
sudo add-apt-repository ppa:webupd8team/java
Next I do the update and finally when I run the command
sudo apt-get install oracle-java8-installer
I get the error
E: Unable to locate package oracle-java8-installer
Any ideas how can I get through that and istall java 8 on cloud9?
As noted by christophetd, I completed the following steps and everything installed without issue:
$ sudo vim /etc/apt/sources.list
Add the following lines of code to the file:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
$ sudo apt-get update
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get install oracle-java8-installer
$ java -version
java version "1.8.0_101"
Add the two following lines to your file /etc/apt/sources.list (which you can create if it does not exist)
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
Then run sudo apt-get update, and you should be able to install oracle-java8-installer.
This basically does the add-apt-repository manually. I suspect the issue is due to the fact that the default source files /etc/apt/sources.list.d/* are mounted as read-only (see for instance this topic on Cloud9 community)
I'm trying to compile libreoffice, to use it "online", i.e: in a web browser (see a demo here: http://www.youtube.com/watch?v=CVR7HqDokmA
).
When running the executable, I get this error:
**Gdk-ERROR **: Unsupported GDK backend: broadway**
These are the steps I do to compile libreoffice on a Ubuntu 11.10 Linux box:
cd /opt
mkdir -p libreoffice
cd libreoffice/
git clone git://anongit.freedesktop.org/libreoffice/core
cd core
cat >> /etc/apt/sources.list << EOT
deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu oneiric main
EOT
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1378B444
sudo apt-get update
sudo apt-get build-dep libreoffice
sudo apt-get install -y libgnomevfs2-dev
sudo apt-get install -y doxygen
./autogen.sh --enable-gtk3 --without-java --disable-mozilla --without-system-mozilla
make
make dev-install
cd install/program;
. ./ooenv;
export SAL_USE_VCLPLUGIN=gtk3
export GDK_BACKEND=broadway
./soffice --writer
What is the problem here? Is there any other compilation option I can check?
Seems your GTK hasn't been compiled with the broadway backend enabled. Depends on your distro.
As liberforce correctly pointed out, you need a BROADWAY-enabled GTK.
I did just discover ubuntu 12.04 ships with a BROADWAY-enabled GTK...