Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I want to install gcc 4.1.2 on my Ubuntu 64 bit system, which currentcly has gcc 4.4. I want to keep on using the current gcc, but want to add gcc 4.1.2 as well. Any simple way to do it, that is install gcc 4.1.2 on my system?
Easy, just take it from an archive of the older Ubuntu releases. For example, my machine (still running natty) has
edd#max:~$ ls -l /usr/bin/g++-*
-rwxr-xr-x 1 root root 242752 2010-09-10 04:16 /usr/bin/g++-4.3
-rwxr-xr-x 1 root root 263240 2011-03-31 15:22 /usr/bin/g++-4.4
-rwxr-xr-x 1 root root 275856 2011-04-18 09:25 /usr/bin/g++-4.5
edd#max:~$
The 4.1.* series had some issues. Even g++-4.2.1, the default on OS X, is not all that great. But you should definitely have the option of installing this.
When you do this, by all means go the package management route of installing proper dependencies. You will get matching packages for the other dependencies too.
In other words, you need to adjust /etc/apt/sources.list to point to an older release that had this version.
sudo apt-get install gcc-4.1=4.1.2 gcc-4.4
seems the straightforward solution to me. Since #DirkEddelbuettel noted that newer Ubuntu distributions dropped it, add an older distribution that has gcc-4.1 to your /etc/apt/sources.list. The Ubuntu people maintain a great website for looking that up; hardy, lucid and maverick seem great.
This should do :
sudo apt-get install gcc-4.1=4.1.2-27ubuntu1 gcc-4.1-base=4.1.2-27ubuntu1 cpp-4.1=4.1.2-27ubuntu1 g++-4.1
Other way is to download gcc 4.1.2 and dependent libraries, and compile it yourself.
Once installed see others:
Use the -V flag to run a particular version:
-V <version> Run gcc version number <version>, if installed
Related
i am new to linux and I have the following question:
I am trying to install MINGW in Ubuntu.
I ran the command:
sudo apt-get install mingw-w64
It was installed, and if i put the command gcc it runs ok. The problem is g++ command does not work. I guess it is because i don't have the c++ compiler (as I read in similar questions in stackoverflow).
I read too that you can use the next command:
mingw-get install g++
but i don't have the executable program for this command.
My question is, how can I install that executable? or is there another way to update my mingw so I can use the g++ compiler?
Hope I have explained myself correctly. Thank you for any help I receive.
mingw-get is a windows specific package manager, it is not needed when you use a native linux package manager such as APT.
Installing package mingw-w64 depends on package g++-mingw-w64, which depends on g++-mingw-w64-i686 and g++-mingw-w64-x86-64.
These packages install the mingw cross compilers as
/usr/bin/x86_64-w64-mingw32-g++-posix
/usr/bin/x86_64-w64-mingw32-g++-win32
/usr/bin/i686-w64-mingw32-g++-posix
/usr/bin/i686-w64-mingw32-g++-win32
Older versions of mingw cross compiler shipped /usr/bin/i586-mingw32msvc-c++, which is replaced by i686-w64-mingw32-c++-win32
You can usually use this toolchain in a project by running ./configure CXX=i686-w64-mingw32-c++-win32 or make CXX=i686-w64-mingw32-c++-win32
Note: the above description is correct for the most recent toolchain in Debian unstable. It may need some minor tweaking for older systems.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have CentOs 6.4 64 bit installed on my VPS, when i am trying to install openssl-devel, it is giving me issue given below:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for openssl which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of openssl of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude openssl.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of openssl installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of openssl installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: openssl-1.0.0-27.el6_4.2.i686 != openssl-1.0.1e-16.el6_5.4.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Can anyone help me about this?
Finally sorted out.
Here is the problem:
I was install python 2.7 First and then openssl-devel. Whenever i access any https repository it gives me error.
Here is the steps to solve the issue:
1. Install openssl
2. Install openssl-devel
3. Reinstall Python 2.7
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was wondering if it is possible to install multiple versions of g++ on the same machine without any problem.
I use the almost current gcc for my work(4.6.1). Now for my studies, my teacher has given us an incomplete project to complete and he says we should install gcc 3.4.3 .
please note that I have already read this : Is it possible to install 2 different versions of GCC at the same time? but I don't know what PATH I should set.
Moreover, I would like to use eclipse for both version. So I may need some guidance for that settings too.
Thank you very much
In bash you could do two scripts like this:
first one:
export PATH=/path/to/your/3.4.3/bin:$PATH
eclipse&
and
export PATH=/path/to/your/4.6.1/bin:$PATH
eclipse&
By running one of those, eclipse should use first gcc it finds in your path. Also your default gcc should still be primary, if you don't run any scripts.
BTW:
You can probably strike a deal with your professor on what c++ standard he wants you to use (and what libraries), not what outdated version of compiler you should use to compile your code.
If you are using some Linux distribution, you can install several versions of GCC; for instance on Debian or Ubuntu you could install both gcc-4.6 and gcc-4.7 (the exact versions available depend upon the actual distribution).
Notice that GCC 3.4.3 is a very ancient version of the compiler (it has been released in november 2004). You may have trouble to install such an ancient version of GCC on your machine. Notice also that recent GCC (last version is 4.7) gives much better warnings, optimizations, and standard conformance than ancient version.
Of course, you don't need eclipse to use GCC. You could use some plain editor like gedit or emacs, and compile either on a command line (if you have only one file) or using a builder like make.
I would not bother installing GCC 3.4.3 on a recent machine (i.e. any Linux distribution from the last few years), because you could spend more than a week in installing such an old thing, and still fail. I would use the latest GCC available on that machine, always compile with -Wall -g and ask (or tell) my teacher about it.
Learn also to use the gdb debugger, and some version control like git.
The hints I gave here are probably relevant to you.
I'd like to build the latest version of gcc on a mac. I have the latest xcode but I'm looking for some of the c++0x features that are in more recent versions (the lambda functions, etc).
Are there any good step-by-step tutorials on doing this?
You should look at the Homebrew project.
Homebrew allows you to do things like this:
brew install gcc
Mac homebrew installation instructions are available here.
Add GCC support to a fresh Xcode 4.2 installation using this homebrew formula:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
Upgrading from Xcode 4.1 doesn't drop existing GCC support, so this formula is only useful if you're working with a fresh 4.2+ installation.
One option is to install MacPorts and install the gcc46 package:
sudo port install gcc46
Another option is to download the source code and build it as follows:
tar xzvf gcc-4.6.0.tar.gz
cd gcc-4.6.0
./configure
make
Note that GCC 4.6.0 requires as prerequisites GMP 4.2+, MPFR 2.3.1+, and MPC 0.8.0+. If ./configure fails, it's probably because you're missing one of these (though it should give you a helpful error message in any case).
Building will take a while—likely several hours, depending on your hardware.
I would suggest building it yourself (Adam details how to do so). This will give you fine control on where to install and all the options you want to select. My experience from having multiple versions of gcc is that, if care is not taken apple's version of gcc can be damaged.
To speed up gcc installation you might want to look at --enable-languages option. If there are languages you don't need installed with the new gcc then you may not want to select them.
We have a new application that requires glibc 2.4 (from gcc 4.1). The machine we have runs on has gcc 3.4.6. We can not upgrade, and the application must be run on this machine.
We installed gcc 4.1, however, when it comes to compile time it is using all the includes, etc, from 3.4.6.
How do we get around this?
Any suggestions on using 4.1 for just this application?
Refer "How to install multiple versions of GCC" here in the GNU GCC FAQ.
There's also a white paper here.
for Ubuntu it's pretty easy
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
and then install for example gcc version 6
sudo apt-get install gcc-6
Have you tried gcc-select? Otherwise, try setting the INCLUDE_PATH and LIBRARY_PATH in your shell.
update-alternatives is a very good way to have multiple gcc versions:
http://ubuntuguide.net/how-to-install-and-setup-gcc-4-1g4-1-in-ubuntu-10-0410-10
You possibly still execute the old gcc. Try making a symlink from gcc to your version of it, like
ln -s gcc-4.1 gcc
Beware of not removing an old "gcc" binary placed there, in case they placed not just a symlink. If you can recompile your own gcc version, the safest is just use another prefix at configure time of gcc, something like --prefix=/home/jojo/usr/gcc (i did it that way with gcc-4.4 from svn-trunk, and it worked great).
Note that that just runs the right gcc version. If you update your gcc, your glibc won't be updated automatically too. It's a separate package which is deeply coupled with the rest of the system. Be careful when installing another glibc version.