Mingw ошибка установки

Long story short, the official installer is broken and not been fixed for years, so we have to install it manually.


installer_download_link

The official download link above would bring you to sourceforge: https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe

And in the same folder that contains the installer, there’s a repository.txt. (about this file)
repository

Take a look at it, the installer basically just download and unzip the build from one of these urls within repository.txt. Choose the url you want and download/upzip it manually. (In my case, I use 8.1.0|x86_64|posix|seh|rev0 setup)
repository.txt

Last, setup the Path environment variable pointing to your unzipped bin folder, let say C:mingw64bin, and this should do the trick.

Method to switch from MinGW-w32 to MinGW-w64

  • Download the executable file of MinGW-w64 Refer the EDIT

(Executable file link may change for future releases, this is for Version 8.1.0, Kindly cross verify the latest version before installing from this link)

  • Installation Process (In Settings):
Version: PICK LATEST
Architecture: x86_64
Threads: posix
Exception: seh

If anyone is trying to add MinGW-w64 as a PATH variable and is not able to find the gdb.exe in C:msys64mingw64bin, try looking for it in the Program files.

C:Program Filesmingw-w64x86_64-8.1.0-posix-seh-rt_v6-rev0mingw64bin

The gdb.exe and other files are located in this directory.


EDIT:

After making some changes in the launch.json file in VSCode, the MinGW-w64 GDB debugger started giving errors because there was 2 versions of MinGW in different folders i.e, MINGW and mingw64!

It is essential that the installation path does not contain any spaces
(i.e., space in «Program Files»), this will create conflicts later.

STEPS:

1. Uninstalled all the versions of GCC that was installed in the PC — Cygwin, MSYS2(32 bit) and mingw64(64 bit) and installed the MinGW-w64 again, this time using the MSYS2.

Please start afresh, if debugger is giving errors and if versions are clashing!

2. Download the MSYS2 installer from this link.

Install process is simple, follow the steps mentioned in the website!

It is essential that the installation path does not contain any spaces. Therefore, we cannot install MinGW-w64 in Program Files.

3. After Installation is complete: Open MSYS2 terminal (pink icon).

Update the package database and base packages using:

pacman -Syu

After this, Update rest of the base packages using:

pacman -Su

4. Now switch over to MSYS2 MinGW 64-bit terminal (blue icon).

To install gcc and g++ for C and C++.

For 64 bit:

pacman -S mingw-w64-x86_64-gcc

To install debugger (gdb).

For 64 bit:

pacman -S mingw-w64-x86_64-gdb

5. Now you’re all SET!

Check versions:

gcc --version
g++ --version
gdb --version

6. Finally, remove the old environment variables if any are left and add the new environment variable to the PATH!

BEFORE DEBUGGING FILES IN VSCode, MAKE SURE TO ADD -g tag while building, otherwise breakpoints will be ignored by the debugger!

Footnote:
It’s very important to keep all the versions in one folder, if folders are different, then life will get tough later!

Привет, вы моя последняя надежда, я тут решил развиваться в плане информационной сферы ( начал смотреть курсы на ютубе) , и всё как бы шло неплохо пока я не столкнулся с проблемой при установке софта. Конкретно при автоматической установке компилятора для С (ming windows), он выдает ошибку

«mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-setup-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-setup-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/minw/mingw-get-setup-0… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-setup-… download failed
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-gui.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-lic.tar.xz»

При попытке ручной установки он в любом случае перебрасывает на «sourceforge.net» который выдает ошибку «The sourceforge.net website is temporarily in static offline mode».

Большая проблема в том что видео-уроки 2014 года и возможно и возможно многое изменилось с того времени. Да , я очень долго и нудно искал как исправить эту проблему, но даже тут ссылки находятся на sourceforge.net который не открывает ссылку на тему а выдает ошибку. У меня сейчас это засело в душе и голове и мне правда хочется научиться, но тут вот так случилось. Прошу помощи людей которые в этом понимают,не знаю можно ли кидать ссылки ( точнее я прочитал в правилах но не уверен), поэтому кину:D

https://sourceforge.net/home.html

www.mingw.org

В чем ошибка при установке Mingw w64 для C++?

Скачал здесь.
Вроде установил все правильно
62600772f24cb090110313.jpeg
Пользуюсь Far Manager, поэтому были нужны «g++.exe» и «gdb.exe». Но gdb я не нашел. Хотел в edit command указать путь к gdb с Dev-Cpp, но возникали ошибки. Что делать?
6260077f22410942098814.jpeg

  • Вопрос задан 20 апр. 2022
  • 147 просмотров

Простой 1 комментарий

  • Facebook
  • Вконтакте
  • Twitter

Рекомендую использовать mingw не напрямую, а установленный в msys2. В качестве дополнительных бесплатных плюшек получаете:
1. командную строку bash со всеми линуксовыми утилитами и прочим. Утилиты можно вызывать из cmd винды то же, прописав пути в PATH.
2. менеджер пакетов pacman. В репозиториях куча портированных под mingw сторонних библиотек.
3. Все популярные IDE смогут находить установленный mingw, если задать переменные окружения в винде:

где X:msys64 — путь куда вы установили msys2.
Для доступа к линуксовым утилитам из командной строки винды добавьте путь X:msys64usrbin в переменную окружения PATH. Для доступа к компилятору, отладчику и т.п. добавьте в PATH X:msys64mingw64bin

После установки msys2, mingw надо установить с помощью менеджера пакетов:

В примерах я ставлю вариант mingw для x32 (i686) и x64 (x86_64). Если нужен только один из них убираете соответствующий пакет.

mingw-w64 installer «the file has been downloaded incorrectly»

I am trying to install mingw-w64 onto Windows. However I receive an error, «the file has been downloaded incorrectly». Redownloading the setup file again from sourceforge does not fix the problem. Is there an alternative way to install it or am I doing something wrong?

7 Answers 7

Old post but same problem, the installer doesn’t seem to work.

I give the solution which works for me

You can directly download the archive of MinGW64 with your chosen configuration :

Once the compressed file downloaded, you have just to extract and copy/paste the MinGW64 folder( with the pre-compiled librairies) to your chosen folder ( in my case : C:mingw64)

I got same error and solved it, after struggling a few hours. You should download MinGW64 via https://winlibs.com/#download-release. enter image description here

After downloading, You should unzip mingw64 file to a folder(in my case I unzipped it to c disk; C:mingw64)

And then you have to set up path. for that follow below steps;

  1. open settings.
  2. Search for Edit environment variables for your account.
  3. choose path variable and then select edit.
  4. Select New and add the Mingw-w64 folder path(bin folder). In my case, I added (C:mingw64bin).
  5. Select OK to save the updated path. And reopen your cmd, then check if everything is good by typing; gcc —version

Timur Turbil's user avatar

Long story short, the official installer is broken and not been fixed for years, so we have to install it manually.

installer_download_link

The official download link above would bring you to sourceforge: https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe

And in the same folder that contains the installer, there’s a repository.txt . (about this file) repository

Take a look at it, the installer basically just download and unzip the build from one of these urls within repository.txt . Choose the url you want and download/upzip it manually. (In my case, I use 8.1.0|x86_64|posix|seh|rev0 setup) repository.txt

Last, setup the Path environment variable pointing to your unzipped bin folder, let say C:mingw64bin , and this should do the trick.

Installing MinGW W64 with FFMPEG on Windows and fixing the weird «file downloaded incorrectly» error.

So guys �� MinGW-w64 is a library you might come across as a dependency to some other software you’re installing.

It appears to have grown in popularity over the years, despite the fact that it seems like the official ORG website has been outdated for quite some time.

MinGW is a dependency for many other computer programs in wide use, such as FFmpeg (for encoding files in video format) which is what I needed to install it for.

And since I had to install MinGW on my Windows PC for just that very purpose (encoding and saving videos in different file formats) I decided to do a write up.

You may have found this MinGW setup article for a completely different reason and I can totally understand it! Still the MinGW-w64 installation process will be similar.

Below what I found was probably the best MinGW installation video. So there is this bug or just some admin rights issue, but many devs (myself included) stumbled over «File Has Been Downloaded Incorrectly» error. And this video helps solve it.

If you’re someone who learns better from visual instructions, it’s probably a good idea to watch this MinGW video first.

But the battle isn’t over yet. For me, I also had to install it together with FFmpeg. And if that’s what you’re trying to do, here’s the entire list of step by step instructions I’ve composed in my notes:

Installing MinGW for use with FFMpeg

For those like me, who are installing FFMpeg, here’s a more detailed setup process:

  1. Download the latest msys2 installer from http://msys2.org/ and run it.
  2. Follow the instructions on the screen to complete the installation.
  3. Start msys2 by double-clicking on the shortcut created in your start menu or desktop.
  4. In the msys2 shell, update the package repositories with the following command:
  1. Exit the msys2 shell and restart it.
  2. In the msys2 shell, install mingw w64 with one of the following commands:

pacman -S mingw-w64-i686-toolchain

pacman -S mingw-w64-x86_64-toolchain

You can now find the mingw w64 compiler binaries in the /mingw32/bin and /mingw64/bin directories.

In the msys2 shell, install cmake with the following command:

  1. In the msys2 shell, install make with the following command:
  1. In the msys2 shell, install git with the following command:
  1. In the msys2 shell, install vim with the following command:
  1. You can now find the cmake, make, and git binaries in the /usr/bin directory.
  2. In the msys2 shell, change to the directory where you want the FFmpeg source code to be downloaded. For example:
  1. In the msys2 shell, clone the FFmpeg git repository with the following command:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

  1. This will create a directory named ffmpeg in the current directory, which contains the FFmpeg source code.
  2. In the msys2 shell, change to the newly created ffmpeg directory:
  1. Run the following command to configure FFmpeg for building:

./configure —enable-shared —disable-static —disable-debug —disable-doc

  1. Run the following command to build FFmpeg:
  1. Run the following command to install FFmpeg:
  1. This will build and install FFmpeg into your msys2 installation directory, which is typically C:msys64usr. Notice that we’re not using sudo here, because we installed FFmpeg into our own directory, not into a system directory.
  2. You can check that FFmpeg was installed correctly by running the following command:

You should see output similar to the following:

ffmpeg version 0.10.15-6:0.10.15-1

deb7u1, Copyright (c)

So this is pretty much why I wrote this article, to document the process and hopefully it helps someone going through the same ��

Oh and in some cases you might also want to install MinGW with MSYS2. (because there is a way to install it without MSYS2, but this case is probably a lot more rare for devs.)

Installing MinGW-w64 With MSYS2

You can install the MSYS2 MinGW-w64 compiler toolchain on your system without using MSYS2 by following these instructions:

  1. Download and install the MSYS2 base installer from https://www.msys2.org/.
  2. Start the MSYS2 MinGW-w64 shell from the start menu.
  3. Run pacman -S mingw-w64-x86_64-toolchain to install the toolchain.
  4. Run pacman -S mingw-w64-x86_64-cmake to install CMake.
  5. Follow the instructions in the README to build your software.
  6. When you’re done, close the MSYS2 MinGW-w64 shell.

Installing MinGW-w64 Without MSYS2

You can also use the MSYS2 MinGW-w64 compiler toolchain from the command line without using MSYS2 by following these instructions:

How To Fix MinGW File Downloaded Incorrectly Error

Are you getting File has been downloaded incorrectly! error installing MinGW on Windows 10 or 11?

Whenever you install MinGW on Windows 10, there is a possibility that you will run into an error during installation process: «File has been downloaded incorrectly!»

Using official installers for software development tools isn’t always ideal. You may be required to run the installer as Administrator. Or your Windows user might not have access to system settings. Sometimes installation file is corrupt (however I really doubt that this is the reason when running this MinGW installer). Errors like this can creep at the most unexpected time.

This video explains the process to fixing the incorrect download error step by step.

MinGW also comes as a Zip archive. Download the MinGW archive and extract it into installation folder.

Solution to MinGW installer’s file has been downloaded incorrectly error.

Bottom Line

This can be due to corrupt file, some OS security issue, or because you are not running the installer as Administrator. However, even running the MinGW’s msi file as admin, you might still experience this file error.

How to fix WinGW file downloaded incorrectly error

  • Download MinGW zip archive.
  • SourceForce link: https://sourceforge.net/projects/mingw-w64/files/
  • Download x86_64-win32-sjlj archive (or one that matches your OS.)
  • Unzip files and copy them to C:mingw64
  • Add C:mingw64 to Environment Variables in Windows 10

The «File downloaded incorrectly» error can be avoided by following these steps.

MinGW, a contraction of «Minimalist GNU for Windows», is a minimalist development environment for native Microsoft Windows applications. MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs.

MinGW does not depend on the Microsoft C-Runtime DLLs. As such, it is possible to compile and link applications with MinGW without the need for any additional libraries. When used in conjunction with the Small Device C Compiler (SDCC), it allows one to develop very efficient embedded systems applications targeting a wide range of devices.

Cover image for Installing MinGW W64 with FFMPEG on Windows and fixing the weird "file downloaded incorrectly" error.

So guys 🙂 MinGW-w64 is a library you might come across as a dependency to some other software you’re installing.

It appears to have grown in popularity over the years, despite the fact that it seems like the official ORG website has been outdated for quite some time.

MinGW is a dependency for many other computer programs in wide use, such as FFmpeg (for encoding files in video format) which is what I needed to install it for.

And since I had to install MinGW on my Windows PC for just that very purpose (encoding and saving videos in different file formats) I decided to do a write up.

You may have found this MinGW setup article for a completely different reason and I can totally understand it! Still the MinGW-w64 installation process will be similar.

Below what I found was probably the best MinGW installation video. So there is this bug or just some admin rights issue, but many devs (myself included) stumbled over «File Has Been Downloaded Incorrectly» error. And this video helps solve it.

(How to install MinGW W64 on Windows and fix the dreaded «File has been downloaded incorrectly» setup error.)

If you’re someone who learns better from visual instructions, it’s probably a good idea to watch this MinGW video first.

But the battle isn’t over yet. For me, I also had to install it together with FFmpeg. And if that’s what you’re trying to do, here’s the entire list of step by step instructions I’ve composed in my notes:

Installing MinGW for use with FFMpeg

For those like me, who are installing FFMpeg, here’s a more detailed setup process:

  1. Download the latest msys2 installer from http://msys2.org/ and run it.
  2. Follow the instructions on the screen to complete the installation.
  3. Start msys2 by double-clicking on the shortcut created in your start menu or desktop.
  4. In the msys2 shell, update the package repositories with the following command:

pacman -Syu

  1. Exit the msys2 shell and restart it.
  2. In the msys2 shell, install mingw w64 with one of the following commands:

pacman -S mingw-w64-i686-toolchain

or

pacman -S mingw-w64-x86_64-toolchain

  1. You can now find the mingw w64 compiler binaries in the /mingw32/bin and /mingw64/bin directories.

  2. In the msys2 shell, install cmake with the following command:

pacman -S cmake

  1. In the msys2 shell, install make with the following command:

pacman -S make

  1. In the msys2 shell, install git with the following command:

pacman -S git

  1. In the msys2 shell, install vim with the following command:

pacman -S vim

  1. You can now find the cmake, make, and git binaries in the /usr/bin directory.
  2. In the msys2 shell, change to the directory where you want the FFmpeg source code to be downloaded. For example:

cd /c/ffmpeg-source

  1. In the msys2 shell, clone the FFmpeg git repository with the following command:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

  1. This will create a directory named ffmpeg in the current directory, which contains the FFmpeg source code.
  2. In the msys2 shell, change to the newly created ffmpeg directory:

cd ffmpeg

  1. Run the following command to configure FFmpeg for building:

./configure --enable-shared --disable-static --disable-debug --disable-doc

  1. Run the following command to build FFmpeg:

make -j4

  1. Run the following command to install FFmpeg:

make install

  1. This will build and install FFmpeg into your msys2 installation directory, which is typically C:msys64usr. Notice that we’re not using sudo here, because we installed FFmpeg into our own directory, not into a system directory.
  2. You can check that FFmpeg was installed correctly by running the following command:

ffmpeg -version

You should see output similar to the following:

ffmpeg version 0.10.15-6:0.10.15-1~deb7u1, Copyright (c)

Phew! Finally.

So this is pretty much why I wrote this article, to document the process and hopefully it helps someone going through the same 🙂

Oh and in some cases you might also want to install MinGW with MSYS2. (because there is a way to install it without MSYS2, but this case is probably a lot more rare for devs.)

Installing MinGW-w64 With MSYS2

You can install the MSYS2 MinGW-w64 compiler toolchain on your system without using MSYS2 by following these instructions:

  1. Download and install the MSYS2 base installer from https://www.msys2.org/.
  2. Start the MSYS2 MinGW-w64 shell from the start menu.
  3. Run pacman -S mingw-w64-x86_64-toolchain to install the toolchain.
  4. Run pacman -S mingw-w64-x86_64-cmake to install CMake.
  5. Follow the instructions in the README to build your software.
  6. When you’re done, close the MSYS2 MinGW-w64 shell.

Installing MinGW-w64 Without MSYS2

You can also use the MSYS2 MinGW-w64 compiler toolchain from the command line without using MSYS2 by following these instructions:

  1. Download and install the MSYS2 base installer from https://www.msys2.org/.
  2. Start the MSYS2 MinGW-w64 shell from the start menu.
  3. Run pacman -S mingw-w64-x86_64-toolchain to install the toolchain.
  4. Follow the instructions in the README to build your software.
  5. When you’re done, close the MSYS2 MinGW-w64 shell.

Понравилась статья? Поделить с друзьями:
  • Minecraft ошибка файловой системы 2143322111
  • Minecraft ошибка файловой системы 2143322101
  • Minecraft ошибка рендера hmd not found 108
  • Minecraft ошибка при создании мира
  • Minecraft ошибка при запуске opengl