Important: Please read the Qt Code of Conduct -

bad variable name in sh file

  • here is my .sh file
    when i run it in terminal i get ./ 11: export: : bad variable name

    appname=`basename $0 | sed s,\.sh$,,`
    dirname=`dirname $0`
    if [ "${dirname%$tmp}" != "/" ]; then
    export LD_LIBRARY_PATH =kitaplik/QmapControl979/Samples/bin
    export LD_LIBRARY_PATH =kitaplik/qwt-6.1/lib
    $dirname/$appname "$@"

  • Lifetime Qt Champion

    @suslucoder There should not be space before =
    And also you are setting LD_LIBRARY_PATH three times, only second one will have effect.
    Do it like this:

    export LD_LIBRARY_PATH=$dirname:kitaplik/qwt-6.1/lib:kitaplik/QmapControl979/Samples/bin

  • @jsulm said in bad variable name in sh file:

    There should not be space before =

    Damn, you beat me to it! How quickly do you see these new posts and reply?!

  • Lifetime Qt Champion

    @JonB I'm only sometimes so fast :-)

  • @jsulm thank you. I fixed it and it solved. But know, im having a trouble with

    I've give the directory but terminal cannot found it

  • Lifetime Qt Champion

    @suslucoder Put that lib in same folder where your executable is.
    But you should actually take a look at "Creating the Application Package"

  • @jsulm I put them in the same folder already

  • Lifetime Qt Champion

    @suslucoder Change to the folder containing your executable and do:


    and post the output here.

  • @jsulm

    ``` (0x00007fff5fdfd000) => not found => /usr/local/lib/ (0x00007f54ca578000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54ca1c4000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c9f6e000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c9cfc000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c94ad000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c91a0000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c8951000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c85a9000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c8390000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c7bf5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c786c000) => /lib/x86_64-linux-gnu/ (0x00007f54c74ce000) => /lib/x86_64-linux-gnu/ (0x00007f54c72b6000) => /lib/x86_64-linux-gnu/ (0x00007f54c6ec5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c6c6e000) => /lib/x86_64-linux-gnu/ (0x00007f54c6a4f000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c67c3000) => /lib/x86_64-linux-gnu/ (0x00007f54c65a6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c63a1000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c6151000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c5e3a000) => /lib/x86_64-linux-gnu/ (0x00007f54c5c36000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c579d000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c53e5000) => /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib/ (0x00007f54c3a02000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c3800000)
    /lib64/ (0x00007f54ca8ce000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c35cf000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c3319000) => /usr/lib/x86_64-linux-gnu/pulseaudio/ (0x00007f54c309a000) => /lib/x86_64-linux-gnu/ (0x00007f54c2e4d000) => /lib/x86_64-linux-gnu/ (0x00007f54c2bdb000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c28a3000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c267b000) => /lib/x86_64-linux-gnu/ (0x00007f54c23f7000) => /lib/x86_64-linux-gnu/ (0x00007f54c21ed000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c1f74000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c1d6e000) => /lib/x86_64-linux-gnu/ (0x00007f54c1b5e000) => /lib/x86_64-linux-gnu/ (0x00007f54c1956000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c1752000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c154c000) => /lib/x86_64-linux-gnu/ (0x00007f54c1326000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c110a000) => /lib/x86_64-linux-gnu/ (0x00007f54c0dee000) => /lib/x86_64-linux-gnu/ (0x00007f54c0bd4000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c095d000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c0754000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c0529000) => /usr/lib/x86_64-linux-gnu/ (0x00007f54c0280000) => /lib/x86_64-linux-gnu/ (0x00007f54c0066000) => /lib/x86_64-linux-gnu/ (0x00007f54bfe51000) => /lib/x86_64-linux-gnu/ (0x00007f54bfc3c000)

  • Lifetime Qt Champion

    @suslucoder You are mixing two Qt builds: one from /usr/local/lib and one from /home/ilknur/Qt5.12.10/5.12.10/gcc_64/lib. Why?
    Please read the link I provided before.

  • @jsulm i've read and i did the steps

    make clean
    export PATH
    qmake -config release

  • Lifetime Qt Champion

    @suslucoder I'm talking about "Creating the Application Package"

Log in to reply