# I cant select the grbl file to add as a library

**URL:** <https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885>\
**Category:** IDE 1.x\
**Created:** [November 8, 2022, 4:44am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885 "2022-11-08T04:44:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarred\_t](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jarred\_t](https://forum.arduino.cc/u/jarred_t)\
**Post date:** [November 8, 2022, 4:44am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/1 "2022-11-08T04:44:46Z")

</div>

Hello, im trying to add grbl as a library in IDE and it is giving me complications. I am following the instructions that i am seeing everywhere:  
1)Download the zip file from github.  
2)Unzip the zip file  
3) Open IDE and add a library via _Sketch/Include Library/Add .Zip Library_  
4) Then i go to my documents folder(where i have the unzipped folder) and then open grbl\_mstr, following that i then click on the grbl folder, press open, and it litterally opens the folder instead of adding it.

Does anyone have a solution to this or has dealt with this already?

---

<div class="post-metadata">

**Author:** ![jarred\_t](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jarred\_t](https://forum.arduino.cc/u/jarred_t)\
**Post date:** [November 8, 2022, 5:06am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/2 "2022-11-08T05:06:55Z")

</div>

Im going to leave this thread here for anyone that needs it. I resorted to downloading the legacy edition instead of using the new 2.0 version of IDE. This immediately fixed the problem. I would still like to use 2.0 however if anyone know a way to fix it on the newer version.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [November 8, 2022, 5:22am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/3 "2022-11-08T05:22:55Z")

</div>

To add a zip library, you do not unzip it first; you point the library manager to the zip, not to the unzipped version.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [November 8, 2022, 10:14am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/4 "2022-11-08T10:14:45Z")

</div>

Hi @jarred_t. Thanks for your report.

> [@jarred\_t](#):
>
> i then click on the grbl folder, press open, and it litterally opens the folder instead of adding it.

The lack of support for using " **Add .ZIP Library**" to install libraries from folders in addition to ZIP files as you can in Arduino IDE 1.x is a known deficiency in Arduino IDE 2.x:

> <https://github.com/arduino/arduino-ide/issues/1651>
>
> \### Describe the request
> 
> Add support for installing libraries from folders vi…a "\*\*Add .ZIP Library\*\*".
> 
> 🙂 The IDE will ensure libraries in any format are installed correctly.
> 
> \### Describe the current behavior
> 
> Three methods are available for installing libraries:
> 
> \- \[Library Manager\](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library)
> \- \[\*\*Sketch \> Include Library \> Add .ZIP Library...\*\*\](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#importing-a-zip-library)
> \- \[manually\](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#manual-installation)
> 
> Although Library Manager is the best option for installation of release versions of the thousands of libraries that are available for installation via that method. The alternative installation methods are required in some cases:
> 
> \- Beta testing non-release development revisions of the library
> \- Installing libraries not available from Library Manager
> 
> Libraries can only be installed from a ZIP file via "\*\*Add .ZIP Library\*\*" if the ZIP archive has the correct structure of the library located in the root folder. Attempts to install from a ZIP file that has a library in a subfolder results in an error:
> 
> \> \*\*Error: Request installZip failed with message: 13 INTERNAL: Library install failed: library not valid\*\*
> 
> Despite the "ZIP" in the name, the Arduino IDE 1.x "\*\*Add .ZIP Library\*\*" feature has an undocumented capability to install libraries from a folder in addition to installation from a ZIP file. Because the average Arduino user has great difficulty with manual installation, this is the best installation method in cases where the ZIP file does not have the correct structure.
> 
> 🙁 The "\*\*Add .ZIP Library\*\*" feature of Arduino IDE 2.x does not allow installation from folders.
> 
> \#### To reproduce
> 
> 1. Download the popular GRBL CNC firmware library from the following link:
> https://github.com/gnea/grbl/archive/refs/heads/master.zip
> 1. Select \*\*Sketch \> Include Library \> Add .ZIP Library...\*\* from the Arduino IDE 2.x menus.
> 1. Select the downloaded \`grbl-master.zip\` file in the "\*\*Select a zip file containing the library you'd like to add\*\*" dialog.
> 1. Click the \<kbd\>\*\*Open\*\*\</kbd\> button.
> 🤷 An error notification appears:
> \> \*\*Error: Request installZip failed with message: 13 INTERNAL: Library install failed: library not valid\*\*
> 
> \*\*ⓘ\*\* This is expected because the GRBL library is in \[the \`grbl\` subfolder of the repository\](https://github.com/gnea/grbl/tree/bfb67f0c7963fe3ce4aaf8a97f9009ea5a8db36e/grbl); not in the root as would be required to produce a valid ZIP archive structure.
> 1. Unzip the downloaded \`grbl-master.zip\` file.
> 1. Select \*\*Sketch \> Include Library \> Add .ZIP Library...\*\* from the Arduino IDE 2.x menus.
> 1. Select the \`grbl\` subfolder from the extracted folder in the right panel of the "\*\*Select a zip file containing the library you'd like to add\*\*" dialog.
> 1. Click the \<kbd\>\*\*Open\*\*\</kbd\> button.
> 
> 🙁 The \`grbl\` subfolder opens in the dialog instead of the expected behavior of installing the library from the folder. There is no reasonable way to install this library via the Arduino IDE.
> 
> Note that, aside from steps 2-4 above which were added to demonstrate that the library can't be installed from the ZIP file, the steps above are the officially documented installation procedure:
> 
> https://github.com/gnea/grbl/wiki/Compiling-Grbl#via-the-arduino-ide-all-platforms-recommended-for-all-users
> 
> \### Arduino IDE version
> 
> 2.0.1
> 
> \### Operating system
> 
> \- Windows
> \- Linux
> 
> \### Operating system version
> 
> \- Windows 10
> \- Ubuntu 20.04
> 
> \### Additional context
> 
> The same repository structure that makes the library impossible to install via "\*\*Add .ZIP Library\*\*" also makes it impossible to submit to Library Manager:
> 
> https://github.com/arduino/library-registry/blob/main/FAQ.md#what-are-the-requirements-for-a-library-to-be-added-to-library-manager
> 
> \---
> 
> Another example of extremely popular libraries hosted in a repository that does not have the structure to produce a ZIP file usable for installation:
> 
> https://github.com/jrowberg/i2cdevlib/tree/master/Arduino
> 
> The library author is aware of the situation, but has not been able to manage the necessary restructuring (which requires splitting the repository into many separate repositories in this case): https://github.com/jrowberg/i2cdevlib/issues/311
> 
> \---
> 
> Originally reported at https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885
> 
> \<a name="workaround"\>\</a\>
> 
> \#### Workaround
> 
> Manually install the library. Instructions are available here:
> 
> https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#manual-installation
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous requests in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the feature was still missing when using the latest \[nightly build\](https://github.com/arduino/arduino-ide#nightly-builds)
> \- \[X\] My request contains all necessary details

The subject was discussed with the Arduino IDE 2.x development team some time back and unfortunately due to technical limitations it is not possible to emulate the behavior of the Arduino IDE 1.x " **Add .ZIP Library**" feature in this respect. So in Arduino IDE 2.x " **Add .ZIP Library**" can only be used with ZIP files.

I saw that the official Grbl installation instructions relied on this capability. I have added Arduino IDE 2.x-specific instructions to their documentation to prevent others from experiencing the same problem:

[https://github.com/gnea/grbl/wiki/Compiling-Grbl#if-you-are-using-arduino-ide-2x](https://github.com/gnea/grbl/wiki/Compiling-Grbl#if-you-are-using-arduino-ide-2x)

Since you have already installed the Grbl library using Arduino IDE 1.x, you can simply go back to using Arduino IDE 2.x without any need to install the library again.

Please let me know if you encounter any problems.

> [@sterretje](#):
>
> do not unzip it first; you point the library manager to the zip, not to the unzipped version.

The problem is that the Grbl library is in a subfolder of the repository:

> <https://github.com/gnea/grbl/tree/master/grbl>
>
> //github.com/gnea/grbl/tree/master/grbl

The " **Add .ZIP Library**" feature (in all IDE versions) requires that the library be in the root folder of the ZIP archive. If it is not, the installation fails with an error something like:

> **Error: Request installZip failed with message: 13 INTERNAL: Library install failed: library not valid**

Unzipping the file and then using " **Add .ZIP Library**" to install the library from the subfolder of the unzipped folder was the workaround for that situation.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [November 8, 2022, 12:30pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/5 "2022-11-08T12:30:13Z")

</div>

> [@ptillisch](#):
>
> The problem is that the Grbl library is in a subfolder of the repository:

Thanks for that. I have GRBL installed but can't remember how I did that. For me, if one way does not work, I install manually without even thinking about it.

---

<div class="post-metadata">

**Author:** ![johnwasser](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnwasser/32/214270_2.png) [@johnwasser](https://forum.arduino.cc/u/johnwasser)\
**Post date:** [November 8, 2022, 3:54pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/6 "2022-11-08T15:54:52Z")

</div>

Drag the 'grbl' folder from the unzipped 'grbl\_master' folder to the 'libraries' folder. Re-start the IDE and the 'grbl' library will be installed.

---

<div class="post-metadata">

**Author:** ![cabinfourus](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cabinfourus/32/925110_2.png) [@cabinfourus](https://forum.arduino.cc/u/cabinfourus)\
**Post date:** [May 2, 2023, 4:05pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/7 "2023-05-02T16:05:04Z")

</div>

didn't work for me

---

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [May 2, 2023, 4:10pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/8 "2023-05-02T16:10:13Z")

</div>

I like the "Build as a normal Arduino IDE project" method:

> **[Compiling Grbl](https://github.com/gnea/grbl/wiki/Compiling-Grbl#build-as-a-normal-arduino-ide-project)**
>
> An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino - gnea/grbl

---

<div class="post-metadata">

**Author:** ![johnwasser](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnwasser/32/214270_2.png) [@johnwasser](https://forum.arduino.cc/u/johnwasser)\
**Post date:** [May 2, 2023, 9:21pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/9 "2023-05-02T21:21:03Z")

</div>

Download [GitHub - gnea/grbl: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino](https://github.com/gnea/grbl) (or [GitHub - gnea/grbl-Mega: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560](https://github.com/gnea/grbl-Mega)) as a .zip file using the green "Code v" button and selecting "Download ZIP"

Unpack the "grbl-master.zip" file.

Copy the 'grbl' folder (from the expanded grbl-master folder) into the 'libraries' folder of your sketchbook folder.

Select Tools -\> Manage Libraries... to re-scan the libraries folder.

Close the Library Manager dialog.

Select your Arduino UNO board (or Arduino MEGA 2560 board) and the corresponding serial port.

Select File -\> Examples -\> grbl -\> grblUpload.

Upload that 'example' to your Arduino and that should install grbl.

---

<div class="post-metadata">

**Author:** ![cabinfourus](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cabinfourus/32/925110_2.png) [@cabinfourus](https://forum.arduino.cc/u/cabinfourus)\
**Post date:** [May 10, 2023, 1:45am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/10 "2023-05-10T01:45:14Z")

</div>

I had to move the grbl subfolder from the file and place it in the Arduino libraries manually. You can't copy and past. It doesn't work.

---

<div class="post-metadata">

**Author:** ![Ballscrewbob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ballscrewbob/32/950458_2.png) [@Ballscrewbob](https://forum.arduino.cc/u/Ballscrewbob)\
**Post date:** [May 30, 2023, 11:45pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/11 "2023-05-30T23:45:27Z")

</div>

Copy paste works in windows for the GRBL folder !

---

<div class="post-metadata">

**Author:** ![firehawk44](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@firehawk44](https://forum.arduino.cc/u/firehawk44)\
**Post date:** [October 16, 2023, 10:59pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/12 "2023-10-16T22:59:34Z")

</div>

I extracted the gbrl folder to the desktop reziped it, pointed to it with IDE and this worked for me

---

<div class="post-metadata">

**Author:** ![rdlamb](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rdlamb/32/1013044_2.png) [@rdlamb](https://forum.arduino.cc/u/rdlamb)\
**Post date:** [December 12, 2023, 10:38pm UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/13 "2023-12-12T22:38:43Z")

</div>

That worked for me, thanks.

---

<div class="post-metadata">

**Author:** ![teory](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/teory/32/1054192_2.png) [@teory](https://forum.arduino.cc/u/teory)\
**Post date:** [April 1, 2024, 11:51am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/14 "2024-04-01T11:51:17Z")

</div>

can you solve grbl problem bro? grbl not to seen on ardunio library . l have same problem as you.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 2, 2024, 3:10am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/15 "2024-04-02T03:10:15Z")

</div>

Hi @teory. Please carefully follow the instructions that are provided here:

> **[Compiling Grbl](https://github.com/gnea/grbl/wiki/Compiling-Grbl#via-the-arduino-ide-all-platforms-recommended-for-all-users)**
>
> An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino - gnea/grbl

If there is anything in the instructions you don't understand, or if you have any problems while following them, then provide a detailed description of the dilemma in a reply here and we'll provide assistance.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 29, 2024, 3:11am UTC](https://forum.arduino.cc/t/i-cant-select-the-grbl-file-to-add-as-a-library/1050885/16 "2024-09-29T03:11:07Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
