Sample Header Ad - 728x90

How to install MinGW on RH 7 without internet?

0 votes
1 answer
1489 views
I am trying to install MinGW on a Linux Red Hat 7 machine. Unfortunately I have no internet on that machine for security reasons, although I can copy over files. This question tells me that there should be MinGw in the EPEL 7. https://unix.stackexchange.com/questions/327156/where-can-i-find-and-install-the-mingw-w64-packages-for-centos-7 So I was able to install EPEL 7 following the directions here: https://fedoraproject.org/wiki/EPEL However I did have to manually download the epel-release-latest-7.noarch.rpm package, and then run yum install However, then I get stuck. I try sudo yum install mingw64-gcc, and I get a long error message ending in:
One of the configured repositories failed (Unknown),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo= ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable 
        or
            subscription-manager repos --disable=

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
So, I try both sudo yum install mingw64-gcc --disablerepo=x86_64 and sudo yum install mingw64-gcc --disablerepo=epel/x86_64, as the error message suggests, and I get the same message both times. At this point, I suspect the issue is yum can't find EPEL packages because I have no internet, and I am failing due to that. I also tried sudo yum --enablerepo=extras install epel-release since that was suggested in some posts but that also failed. I don't know what this is, but I suspect that just installs EPEL 7, which I have already done. Questions: 1. Are the EPEL packages like MinGw contained within the the epel-release-latest-7.noarch.rpm package I downloaded? Or does the sudo yum install mingw64-gcc command go to some URL and try to get mingw from there? 2. If sudo yum install mingw64-gcc is trying to get MinGw information from some other location on the internet, is there a way I can download it and copy it over the way I did with EPEL 7? 3. Finally, it looks like my attempt to install minGw is failing because EPEL 7 can't get info for some other packages which I don't think should be related to MinGw (x86). This is a guess though. If that is the case, can I tell yum to stop looking for all other repos other than mingw? Finally, I am really just trying to install MinGw on my RH 7 without internet, so if anyone has some other way to do that, I will be happy with that.
Asked by John Smith (1 rep)
Mar 9, 2020, 04:39 PM
Last activity: Mar 9, 2020, 04:51 PM