How can I install GCC compiler in Fedora without internet? - gcc

I got a new Fedora machine some time ago from this link http://download.fedoraproject.org/pub/fedora/linux/releases/21/Workstation/i386/iso/Fedora-Live-Workstation-i686-21-5.iso. I need to install software, but for that I need a compiler ("No acceptable C compiler found in $PATH.") So, I want to install GCC compiler. I cannot connect to internet on the Fedora machine, but I do have an internet connected Windows 8.1 machine, that I can use to download and copy files via 2gb flash drive. Please help me on how to go about installing GCC to the Fedora machine.

If you have the packages you need from the Fedora mirrors on your flash drive, you can install them on the command line with (for example)
yum install /media/pathname/gcc-4.8.2-1.fc20.i686.rpm
However, since 2GB isn't big enough to include the entire Fedora release, you will need to pick and choose the packages. And this will leave you in the state we used to call "RPM hell" back before yum came along and solved that. You can either figure out the dependencies one by one (start with the above, and then add anything it tells you it is missing), or, you could go all out and copy the entire mirror in 2GB sized chunks to your Fedora machine's hard drive so you have it for any future needs.

Related

Maven on Windows Subsystem For Linux

I'm trying to run maven on Windows Subsystem for Linux, and getting "cannot allocate memory" errors. However, free -m shows that I have plenty of memory available, and the same build on Cygwin succeeds.
Anyone have any tips for dealing with this? I'd prefer to change my settings.xml over my pom.xml's, but I'm open to almost anything.
Try to install maven by downloading it, not by doing an apt-get install maven. On my Ubuntu machines I've never been able to get the "apt" version to work right and have always resorted to downloading it directly from the Maven download instead. I tried that on my WSL and was able to build a pretty good sized JEE project with no issues.

Install ImageMagick for paperclip gem in windows

I followed this guide to use paperclip http://railscasts.com/episodes/134-paperclip?language=en&view=asciicast
it is all ok but note that to enable resizing you’ll need to have ImageMagick installed on your server.
So how should i install ImageMagick ?? i have WINDOWS 8 and on the site http://www.imagemagick.org/ download does not work!!!!
It certainly works - you need to make sure of 2 things:
You install the correct static version for your OS (32-bit vs 64-bit). The 32-bit (x86) will work regardless, the 64-bit (x64) will only work on a 64-bit system. And you need to download the static version - not the -dll version - as Paperclip needs to call the executable directly. (Of course, I'm sure that you knew that downloading the installer file isn't going to install it for you, right? That is, you need to open the file to start the installation...)
You add the bin directory to your environment path. The installer should do this for you, unless you unchecked that option.
UPDATE
Just noticed that the links are broken :) They still point to the older 6.8.5-6 version that have since been moved to legacy. You can get the latest binaries from here.

is it possible to code CUDA at virtual box Win8?

I know that by using virtual box, graphics card cannot be utilized by all the measures so I think it is not possible but I also think that coding cuda at least setting the CUDA developing environment is easier at Windows (unfortunately) thus if it is possible I plan to setup win8 to virtual box on my Ubuntu.
I do want to use win since I am at optimus Nvidia machine thus there is a driver problem at Ubuntu. In addition compilation of the code at Eclipse does not work due to that driver flaw. In case I use Win there might be the remedy of the problem.
Even if you get success in setting up environment in your virtual box to compile cuda code and you compiled cuda code there it will be of no use because you wont be able to run the code in virtual box.
Yes, your are absolutely right that installing drivers on optimus nvidia card is difficult task. I was also stuck with the same problem. but with release of cuda 5, installing cuda on Ubuntu is very simple.
follow these simple steps.
Driver installation ##
Download cuda 5 from here.(32bit or 64bit depending on OS)
Cuda 5 download
Install required tools by following command
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
Next, blacklist the unnecessary modules
sudo gedit /etc/modprobe.d/blacklist.conf
add following lines at last
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
and reboot your system.
After reboot press Ctrl+Alt+F1. Login there and enter following command.
service lightdm stop
Go to location where you have downloaded cuda 5. In my case its on desktop.
cd Desktop
make it run from shell
chmod +x cuda_5.3.35_linux*****
Run from terminal
./cuda_5.3.35_linux*****
accept it, when asked to install drivers press y and n for cudatoolkit and gpucomputingsdk
now reboot and you are done with driver installation.
To install cudatoolkit and gpucomputingsdk follow this link
Cuda 4.2 installation on Ubuntu

Installation script for multiple operating systems

I have to install a C compiler with cilkplus branch which is recently added to the GCC. Since it is recent so I ave to install it manually and there are no direct methods available to that. I plan to install it at custom location. I installed it on a redhat 6 and ubuntu 12.04 successfully but I found that the settings of environment variables are different on both operating systems ( not a surprise ).
For example to install the compiler on ubuntu 12.04 you would need C_INCLUDE_PATH=/usr/lib/x86_64-linux-gnu a directory which does not exist on redhat 6.
I plan to write a single script for installation of this compiler on many systems(different distributions of linux). How can I do it.
One way I can think of is to check which OS and version you are running and set environment variables accordingly but here also I do not know how to do it.
Any other suggestions are also valueable.
Thanks
I would use cmake for easy dependency checking and handling

How can I build an RPM on my MacOS system?

I'm running Mac OS X 10.6.6. I have some data-only RPMs that I'd like to build.
Until recently I've done most of my development on a VM running CentOS, but one by one I've been able to transition these tasks to the Mac proper. I've been using Fink to access the Open/Free tools I need, but I'm not ready to go to Fink unstable, where the RPM5 package has been for a while.
I've also tried to build the RPM utilities from source, with little luck so far.
Is anyone else building RPMs natively on a Mac? If so, how?
You can install rpmbuild on MacOS using Homebrew package manager.
brew install rpm
This installs a bunch of packages including rpmbuild which is used to build an rpm. You can then run the following command to create an rpm
rpmbuild <specfile>
I was in this same situation today, but I've just successfully built and run rpm by first installing MacPorts and then installing from there. It requires an absolutely ludicrous 1.8GB of downloads before you can even build because it requires installing the (free) Xcode developer tools package from the Apple Store at 1.6GB, then another 140MB package of command line tools.
So, first carefully follow every step of the clear instructions here to install MacPorts:
http://www.macports.org/install.php
After doing all that, be sure to run the update command (as mentioned in the install instructions) so that it downloads the available software ports package (it'll say "can't find rpm" if you don't):
sudo port -v selfupdate
Once all that is done, run the following to fetch rpm and build it:
sudo port install rpm
On my early 2011 MacBook Pro with Lion, it took about 10 minutes to download everything and build.
The whole process takes a while, but it works. Good luck!
As #user132447 pointed out, you will need to reformat the drive to MacOS extended (case sensitive).
The rpm which is part of CentOS is different then the RPM5 build. Both are two different projects. And later may work on MacOS, but I would recommend you to go using VMs (or separate systems) which are RPM based only. That will surely save you long hours of fixing and caring about not so useful issues.
RPM from rpm.org doesn't support MacOS yet (it builds I guess - at least the latest version), and this is the rpm which CentOS uses.
I've been using RPM for Darwin for building maven based projects that create RPM artifacts.

Resources