method1

change LD_PRELOAD=./libc.2.26.so in shell to assign libc

export LD_LIBRARY_PATH= <pwd>
export LD_PRELOAD= <libc path>    #SET LD_PRELOAD TO SUBSTITUTE
unset LD_PRELOAD    #DELETE ENV VAR AFTER DEBUG

method2

set LD_PRELOAD when debug pwntools exp

io = process(['./bin'],env={"LD_PRELOAD":"./libc-2.23.so"})