gcc-4.7 with Debian 8 Jessie - linux

I use debian 8 Jessie, which has only gcc-4.9 available in the repositories. I tried to install gcc-4.7 in two ways without success.
First try
I tried installing gcc manually by downloading the file gcc-4.7.0.tar.gz
But when I install the dependency libraries (apt-get install Libmpc-dev libmpfr-dev libgmp-dev gcc-multilib)
the Debian installs, without asking gcc-4.9 and the compatible libraries with gcc-4.9.
I try run make for manual installation, but errors occur and it is not possible to install manually.
Second Try
I tried adding PPA repositories with gcc-4.7, in the file /etc/apt/sourc.list
Add-apt-repository ppa: ubuntu-toolchain-r / test as it teaches in this Link: https://askubuntu.com/questions/193513/problem-adding-a-ppa-to-install-gcc-4-7
When try apt-get install gcc-4.7 you are prompted to install several Dependencies ... when requesting to install the dependencies, the Below.
Root # vmhp110deb8: / home / user1 # apt-get install gcc-4.7 gcc-4.7-base
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Note, by selecting 'gcc-4.7-base' for regex 'gcc-4.7'
Package gcc-4.7-base is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
Is available from another source
E: Package 'gcc-4.7-base' has no installation candidate
Root # vmhp110deb8: / home / user1 # add-apt-repository ppa: ubuntu-toolchain-r / test
I tried to find a repository that has gcc-4.7-base, but then it asks Installation of other dependencies, and informs that it has not found
Libraries are Obsolete, etc.
Attempt not yet tested
Another idea that i had is download the Debian 7 Wheezy DVD (which I think Which has gcc-4.7 and all dependencies) and add as repository, For debian to find all dependencies of gcc.4.7 on DVD. But this idea i not have tested yet.
Could anyone help me with how I could install gcc 4.7 on debian 8?

As you can read here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765379
gcc-4.7 is not included in Debian Jessie
Maybe you can try this
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
EDIT : You already tries this. I didnt notice.
Try this manual:
http://charette.no-ip.com:81/programming/2011-12-24_GCCv47/
I hope this helps to you :)

Related

Ubuntu Linux - Install Packages from Local Repository

We (my workplace) have an embedded product based around an NVIDIA TK1 which is running a custom build of Ubuntu for ARM. As part of the setup routine for our product, we have a custom script which downloads a large number of packages and archives from the web, extracts and installs them.
Ideally what we are looking to do is to pre-download these packages and archives into a "local" repository so that our product uses known versions which work with our application. Auto-updating of packages is disabled and the end product will rarely have access to the internet anyway, we just want to ensure that the versions of packages used remains the same for EVERY product shipped.
As an example, here are parts of the update script:
sudo apt-get install -y linux-firmware
sudo apt-get install -y '.*libxcb.*' libxrender-dev libxi-dev libfontconfig1-dev libudev-dev libx11-dev libx11-xcb-dev libext-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
sudo apt-get install -y gcc-4.9 g++-4.9
sudo apt-get install -y ros-indigo-desktop
# This one is shortened as its a long URL
wget cuda-repo-l4t-r21.1-6-5-prod_6.5-14_armhf.deb
sudo dpk -i cuda-repo-l4t-r21.1-6-5-prod_6.5-14_armhf.deb
Obviously, a large number of the packages will have a lot of dependencies so if there is a way of downloading ALL required packages and ALL required dependencies into a local package repository and change my scripts so they are installed from there, that would the ideal.
I'm unsure as which way would be the best way to approach this.
I have had suggestions of installing all packages onto a base product then "cloning" the file system and pushing it onto other modules however I don't really know the pros/cons of doing this.
UPDATE
Ok, so I've since found a large number of packages in the /var/cache/apt/archives/ folder which seem to all relate to what is installed from our script.
Is it feasible/safe to install ALL of these packages using sudo dpkg -i *.deb?
A good thing would be to use some kind of debootstrap to build a custom image and then flash it on the devices.
To cache the apt-get there is apt-cacher. I haven't tried, but its cache can be freezed.
For the local repositories - reprepro.

PhpStorm Installation issue on Ubuntu 14.04

I am back here again with one more issue that I am having installing PhpStorm on my Ubuntu 14.04. To do so I followed the following steps:
Step 1. sudo apt-get purge openjdk* which gave me a long list mostly saying Package is not installed, so not removed. A few examples:
Package 'openjdk-7-dbg' is not installed, so not removed
Package 'openjdk-7-doc' is not installed, so not removed
...
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Step 2: sudo add-apt-repository ppa:webupd8team/java which ended up saying this:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-set-default : Depends: oracle-java7-installer but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Step 3: Despite those error messages popped up I went ahead and ran sudo apt-get update which executed OK.
Step 4: Tried to run sudo apt-get install oracle-java7-installer which again popped up a lot of negative remarks!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.
So I did not go further with rest of the following commands:
sudo apt-get install oracle-java7-set-default
wget http://download-cf.jetbrains.com/webide/PhpStorm-7.1.3.tar.gz
tar -xvf PhpStorm-7.1.3.tar.gz
cd PhpStorm-133.982/bin
./phpstorm.sh
I have no idea what is going wrong! Somebody please help this absolute newbie to install it.
On another note, if PhpStorm fails to install somehow on my PC, please suggest me a good software which runs on Ubuntu with an inbuilt SASS compiler so that I do not have to run a command every time from terminal? And it would be even better if that software I can get for free! PhpStorm is only a 30-day trial.
EDIT
Strange, I'm using PhpStarm on Ubuntu 14.04 and ant works fine. IntelliJ IDEs are really great.
I have these Java from the same repo you are using.
java-common-0.51
java-wrappers-0.1.27
oracle-java7-installer-7u80+7u60arm-0~webupd8~1
Let's try to purge all the Java packages from you system and then install the Oracle Java again.
Use dpkg -l | grep java to discover all the installed java-related packages.
Then, use apt-get purge on all of them.
Skip the javascipt packages of course.
Then, try to install oracle-java7-installer again. I hope it will be installed correctly.
To install Phpstorm in Ubuntu just follow these steps
1.Run sudo apt install snapd
2.Then sudo snap install phpstorm --classic
3.Then type phpstorm in shell and press enter to launch Phpstorm
Read more about these here

Linux: How to install certain old version of a software via apt-get

I am trying to install the same versions of Apache, MySQL and PHP in my Linux PC (Raspberry Debian) as installed in my remote public server.
For instance, I'd like to install the last legacy release of the 2.2 branch, Apache/2.2.31.
apt-cache showpkg apache2
Output:
Package: apache2
Versions:
2.4.10-10+deb8u4 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages)
But there isn't any information about the 2.2.31 version, neither in "Reverse Provides" section. I can do it by compiling from the sources, but it takes a lot of time. And I tried to find a reliable PPA or a reliable sources for deb packages, without any success.
How can I do it?
If APT tracks the specific version you are looking for, (like Kyle said) then it's pretty easy.
sudo apt-get install <pkg_name>=<pkg_version>
or
sudo apt-get -t=<target_version> <pkg_name>
To see which packages are tracked, run
apt-cache showpkg <package_name>
Unfortunately though, if a particular version is not managed by the APT, then you are out of luck using APT. It might be managed by some of the other package managers out there.
Ref. How can I downgrade a package via apt-get?
If you have the version number, or the target release, apt-get supports choosing a particular version or target release. More details can be found on manual page of apt-get. It can also be accessed from a terminal by typing man apt-get.
sudo apt-get install <package-name>=<package-version-number>
or
sudo apt-get -t=<target release> install <package-name>

How to resolve dependencies while installing application on linux (CentOS 7.1)

When I tried install deluge on my CentOS 7.1 I was facing dependecy problems due to some el6 which are not meant for CentOS 7.1. So, I found this page:
https://gist.github.com/dasgoll/111f6f3364e2ab97bc08
His instructions:
Centos 7.1
yum -y install wget wget hxxp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
browse http://192.168.3.101:8112
check it
yum install deluge-console
And my question is: Why he installed "nux-dextop-release-0-5.el7.nux.noarch.rpm" from li.nux.ro (if I'm not wrong it's a repository, correct me if I'm)? Because I had this dependency problem earlier when I tried installing deluge. But when I used his instructions it resolved all the dependencies automatically for me. So does this rpm file he installed on the first place was for resolving dependencies? If not then how can one work around with dependencies while installing a piece of software/application. Than You in advance.
P.S. I asked the same question in comments there too. But I'm uncertain of receiving reply there (no offence for the guy/girl - dasgoll).
Third party package repos will often use a *-release package to contain both a yum repo definition and a rpm signing public key so that end users can install packages directly from the repo using yum instead of having to find and then download them one by one.

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Resources