# SDL2 Initialization Error

**URL:** <https://discourse.libsdl.org/t/sdl2-initialization-error/23585>\
**Category:** Game Development\
**Created:** [December 17, 2017, 1:10pm UTC](https://discourse.libsdl.org/t/sdl2-initialization-error/23585 "2017-12-17T13:10:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![f00](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/f/c0e974/32.png) [@f00](https://discourse.libsdl.org/u/f00)\
**Post date:** [December 17, 2017, 1:10pm UTC](https://discourse.libsdl.org/t/sdl2-initialization-error/23585/1 "2017-12-17T13:10:37Z")

</div>

Hi, I’m running Xubuntu 17.04 I believe, I’ve installed SDL2 via apt-get install libsdl2\*

When I try to run a program I wrote when I call function SDL\_Init(SDL\_INIT\_EVERYTHING) it fails, SDL\_GetError reports:

Failed loading udev\_device\_get\_action: /usr/lib/x86\_64-linux-gnu/libSDL2-2.0.so.0: undefined symbol: \_udev\_device\_get\_action

I’m not quite sure how to fix it, it seems like it’s a linking error with the library itself maybe. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![actsl](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/actsl/32/2971_2.png) [@actsl](https://discourse.libsdl.org/u/actsl)\
**Post date:** [December 17, 2017, 2:11pm UTC](https://discourse.libsdl.org/t/sdl2-initialization-error/23585/2 "2017-12-17T14:11:09Z")

</div>

udev\_device\_get\_action is in libudev-dev , but why didn’t it install that as a dependency… i have really never tried to use \* in that way, did it install libsdl2-dev ?

---

<div class="post-metadata">

**Author:** ![f00](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/f/c0e974/32.png) [@f00](https://discourse.libsdl.org/u/f00)\
**Post date:** [December 17, 2017, 3:03pm UTC](https://discourse.libsdl.org/t/sdl2-initialization-error/23585/3 "2017-12-17T15:03:49Z")

</div>

Yes, it install libsdl2-dev as well. I do it that way because I am lazy udev is installed as well as libudev-dev

---

<div class="post-metadata">

**Author:** ![actsl](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/actsl/32/2971_2.png) [@actsl](https://discourse.libsdl.org/u/actsl)\
**Post date:** [December 17, 2017, 3:41pm UTC](https://discourse.libsdl.org/t/sdl2-initialization-error/23585/4 "2017-12-17T15:41:45Z")

</div>

You may try to compile and run some examples from the SDL2 source, like this one [https://hg.libsdl.org/SDL/file/874fb85ef7b7/test/testbounds.c](https://hg.libsdl.org/SDL/file/874fb85ef7b7/test/testbounds.c) , still the same error?
