PlatformIO Community

Build Error - LibraryManager


#1

Hello,
I’m trying to build some sourcecode but I’m get this error:

"LibraryManager: Installing id=44 @ ^5.10
Error: Could not find a version that satisfies the requirement ‘^5.10’ for your system ‘windows_amd64’
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it."

I just tryed to do a “pio Update” but the error still exist.

Can enyone help me. Thanks!


#2

There is no 5.10 version of https://platformio.org/lib/show/44/Time


#3

Thank you for the fast answer.
Sorry, I’m newbie.
What does this mean and how I can resolve the problem?

I try this example: https://github.com/PaulStoffregen/Time/blob/master/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino

In the file platformio.ini I write:
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 115200

lib_deps =
# Using library Id Time
44
lib_deps =
https://github.com/gmag11/NtpClient

I’ get allwos the same error:
“LibraryManager: Installing id=44 @ ^5.10
Error: Could not find a version that satisfies the requirement ‘^5.10’ for your system ‘windows_amd64’
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.”

In the file .piolibdeps I sey the 2 librarys: NtpclientLib, Time_ID44


#4

There must only be one lib_deps statement. Use

lib_deps = Time, https://github.com/gmag11/NtpClient

See docs.


#5

Oh, I see where the error comes from. It is a dependency on the NtpClient.

Though the latest version of Time is

So the first library’s dependency declaration is wrong. There is a pull request in https://github.com/gmag11/NtpClient/pull/92/files but the author has not yet responded.

You can solve the problem locally by downloading the NtpClient library into your lib/ folder and changing the library.json file to what’s seen in the pull request.


#6

Wow, thank you four your answer.
Now, I dowloaded the NtpClient and unzipped the folder into my lib folder for the project.
Than a openend the library.json file and delete all and add this text:

“type”: “git”,
“url”: “https://github.com/gmag11/NtpClient.git
},
“dependencies”: [
{
“name”: “ESPAsyncUDP”,
“platforms”: “espressif8266”
},
{
“name”: “Time”,
“version”: “^1.5”
}
],
“examples”: “examples//.ino”
}

in the platformio.ini file I insert:

[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 115200
lib_deps = Time

I get the error: src\main.cpp:40:26: fatal error: NtpClientLib.h: No such file or directory

What I’m doing wrong?
Thank you so much!


#7

Write lib_deps = Time, NtpClient, the dependency graph should show you that the local library in lib/ will be used.


#8

Hello maxgerhardt,
thank you for the help.
Sorry, but unfortunately It doesn’t work:
> ^
> src\main.cpp:40:26: fatal error: NtpClientLib.h: No such file or directory
>
> **********************************************************************
> * Looking for NtpClientLib.h dependency? Check our library registry!
> *
> * CLI > platformio lib search “header:NtpClientLib.h”
> * Web > https://platformio.org/lib/search?query=header:NtpClientLib.h
> *
> **********************************************************************
>
> #include <NtpClientLib.h>
> ^
> compilation terminated.
> *** [.pioenvs\nodemcuv2\src\main.cpp.o] Error 1
> ============================================================================ [ERROR] Took 4.92 seconds ============================================================================
> The terminal process terminated with exit code: 1
>
> Terminal will be reused by tasks, press any key to close it.


#9

Can you share your main.cpp please for reproduction on pastebin.com.


#10

https://github.com/PaulStoffregen/Time/blob/master/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino
This is my code what I use in my main.cpp


#12

Why are you trying to include NtpClient as a dependency if you’re not even using it?

https://github.com/PaulStoffregen/Time/blob/master/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino does not use that library at all, so are you confusing it with say https://github.com/gmag11/NtpClient/blob/develop/examples/NTPClientESP8266/NTPClientESP8266.ino ??

I made the changes referenced in that pull request above to NtpClient’s libraries.json in a downloaded copy of the library in \lib, removed the entry for it from my platformio.ini as I didn’t want platformio to automatically manage and use a downloaded copy any more, created the WifiConfig.h file referenced to put wifi credentials in, and added ESPAsyncUDP the lib_deps list as it is needed. So my lib_deps looks like this now … lib_deps = Time, ESPAsyncUDP and the https://github.com/gmag11/NtpClient/blob/develop/examples/NTPClientESP8266/NTPClientESP8266.ino code compiled just fine.


#13

Oh sorry, it was my error. I copied the false link…:confused:
Thank you for your help. I try it… :grin: