abba23/spotify-adblock

ERROR: ld.so - Debian 12 (Bookworm) ;D

RENANZG opened this issue · 4 comments

Hello. Newbie, here. I installed the new Debian 12 (Bookworm).

When I boot Spotify from the terminal with the command: LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify This warning appears:

ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Segmentation Fault 

Spotify opens and plays, but ad blocking doesn't work.

I believe it is because of the new Debian 12.

Thanks.

abba23 commented

ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

This usually means /usr/local/lib/spotify-adblock.so doesn't exist. Did you perhaps forget to run sudo make install?

Not sure about the segmentation fault though. Maybe try redoing the build steps and check if anything goes wrong during compilation.

user@debian12:$ git clone https://github.com/abba23/spotify-adblock.git
Cloning into 'spotify-adblock'...
remote: Enumerating objects: 105, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 105 (delta 53), reused 39 (delta 39), pack-reused 41
Receiving objects: 100% (105/105), 57.07 KiB | 1.43 MiB/s, done.
Resolving deltas: 100% (54/54), done.
user@debian12:$ cd spotify-adblock
user@debian12:/spotify-adblock$ make
_# cargo build --profile release
cargo build --release
Compiling proc-macro2 v1.0.55
Compiling unicode-ident v1.0.8
Compiling quote v1.0.26
Compiling serde_derive v1.0.159
Compiling serde v1.0.159
Compiling memchr v2.5.0
Compiling autocfg v1.1.0
Compiling hashbrown v0.12.3
Compiling winnow v0.4.1
Compiling indexmap v1.9.3
Compiling regex-syntax v0.6.29
Compiling libc v0.2.140
Compiling lazy_static v1.4.0
Compiling aho-corasick v0.7.20
Compiling syn v2.0.13
Compiling regex v1.7.3
Compiling toml_datetime v0.6.1
Compiling serde_spanned v0.6.1
Compiling serde_regex v1.1.0
Compiling toml_edit v0.19.8
Compiling toml v0.7.3
Compiling spotify-adblock v1.0.2 (/home/user/spotify-adblock)
Finished release [optimized] target(s) in 44.76s
user@debian12:/spotify-adblock$ ls
Cargo.lock config.toml Makefile rustfmt.toml target
Cargo.toml LICENSE README.md src
user@debian12:~$ su -
Senha:
root@debian12:# sudo make install
make: *** Sem regra para processar o alvo 'install' . Pare.

make: make: *** No rule to process the target 'install'. Stop._

root@debian12:# exit
user@debian12:~$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/spotify-adblock.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Spotify opens and plays, but ad blocking doesn't work.

Thanks

abba23 commented

user@debian12:~$ su -

You were not supposed to do that. By switching to the root user you also switched from where the spotify-adblock source files are located to the root user's home directory. That's why sudo make install after that didn't do anything. You have to run it from the same directory you ran make just before.

user@debian12:~/spotify-adblock$ sudo make install
install -D --mode=644 --strip target/release/libspotifyadblock.so /usr/local/lib/spotify-adblock.so
install -D --mode=644 config.toml /etc/spotify-adblock/config.toml
user@debian:~/spotify-adblock$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify
[*] Config file: config.toml
[+] cef_urlrequest_create: https://apresolve.spotify.com/?time=1687099290&type=accesspoint
[+] getaddrinfo: dealer.spotify.com
[+] getaddrinfo: dealer.spotify.com
[+] cef_urlrequest_create: https://login5.spotify.com/v3/login
(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc)(etc).....

Spotify opens and plays fine...

Oh god, kkkkkkkkk. I had said I was noob....

Thanks ! ♡ ♥ ❤ 💔 💝 💓 💕 💖 💗 💞 💘 💙 💚 💛 🧡 💜 🤎 🖤

https://open.spotify.com/track/3kUhNhjgFwRaTkPZdUszfp?si=d9c230a9423d4513