インターネットなしで RH 7 に MinGW をインストールするにはどうすればいいですか?

インターネットなしで RH 7 に MinGW をインストールするにはどうすればいいですか?

Linux Red Hat 7 マシンに MinGW をインストールしようとしています。残念ながら、セキュリティ上の理由からそのマシンにはインターネットがありませんが、ファイルをコピーすることはできます。

この質問から、EPEL 7 には MinGw があるはずだということがわかります。 Centos-7 用の mingw-w64 パッケージはどこで見つけてインストールできますか?

そこで、次の手順に従って EPEL 7 をインストールすることができました。https://fedoraproject.org/wiki/EPEL しかし、epel-release-latest-7.noarch.rpmパッケージを手動でダウンロードし、実行する必要がありました。yum install <my local epel 7>

しかし、その後行き詰まってしまいます。 を試してみるsudo yum install mingw64-gccと、次のような長いエラー メッセージが表示されます。

 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=<repoid> ...

     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 <repoid>
        or
            subscription-manager repos --disable=<repoid>

     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=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

そこで、エラー メッセージが示すように、sudo yum install mingw64-gcc --disablerepo=x86_64と の両方を試してみましたが、どちらの場合も同じメッセージが表示されます。sudo yum install mingw64-gcc --disablerepo=epel/x86_64

この時点では、インターネットがないため yum が EPEL パッケージを見つけられず、それが原因で失敗しているのではないかと思います。

いくつかの投稿で提案されていたので試してみましたsudo yum --enablerepo=extras install epel-releaseが、これも失敗しました。これが何なのかはわかりませんが、おそらく EPEL 7 をインストールするだけだと思います。これはすでに実行しています。

質問:

  1. MinGw のような EPEL パッケージは、ダウンロードした epel-release-latest-7.noarch.rpm パッケージに含まれていますか? それとも、sudo yum install mingw64-gccコマンドは何らかの URL にアクセスし、そこから mingw を取得しようとするのでしょうか?
  2. sudo yum install mingw64-gccインターネット上の他の場所から MinGw 情報を取得しようとしている場合、EPEL 7 の場合と同じようにダウンロードしてコピーする方法はありますか?
  3. 最後に、EPEL 7 が MinGw (x86) に関係ないと思われる他のパッケージの情報を取得できないため、minGw のインストールが失敗しているようです。ただし、これは推測です。その場合、yum に mingw 以外のすべてのリポジトリの検索を停止するように指示できますか?

最後に、私はインターネットなしで RH 7 に MinGw をインストールしようとしているだけなので、誰かがそれを実行する他の方法を持っている場合は、喜んでお手伝いします。

答え1

  1. インストールしたファイルはYUMにEPELリポジトリについて伝えますが、そこに含まれるデータは送信しません。パッケージはインターネット上のさまざまなミラーから取得されます。パッケージはこちらをご覧ください

  2. はい、パッケージを手動でダウンロードできます。ただし、私の知る限り、MinGW-w64 パッケージは EPEL 7 からは利用できなくなりました...

  3. インストールする RPM を入手したら、yum install一般的なパッケージ名ではなく、RPM の名前を使用する必要があります。rpm -i直接使用することもできますが、その場合、構成されたリポジトリはまったく参照されません。

関連情報