Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Running Console App On Server Without Sudo Rights
Forum Updated to NodeBB v4.3 + New Features

Running Console App On Server Without Sudo Rights

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 256 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EverydayDiesel
    wrote on last edited by EverydayDiesel
    #1

    Hello,

    I am trying to evaluate if qt will work for my situation. I basically have 2 machines. 1 is a dev machine and the other is a server. On the server I do not have sudo.

    I am trying to write a console app which works fine on the dev machine.

    When I move it to the server I get this error

    $ ./test2
    ./test2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./test2)
    

    The question is, how can I get this to run without installing something on the server? Is it possible to package and statically link everything or something similar? I am ok with multiple files, I just cant install qt on the server due to lack of sudo rights.

    Thanks in advance for any help you can give.

    Edit:

    // g++ on dev machine

    g++ -v
    Using built-in specs.
    COLLECT_GCC=/usr/bin/g++
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/12/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 12.1.1 20220507 (Red Hat 12.1.1-1) (GCC)
    

    // g++ on server

    g++ -v
    Using built-in specs.
    COLLECT_GCC=g++
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:hsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
    

    Im not partial to any C++ compiler, I just need it to work on both machines :)

    1 Reply Last reply
    0
    • N Offline
      N Offline
      noahlopezdev
      wrote on last edited by
      #2

      you can package your application with programs like linuxdeployqt, it bundles shared libraries into a single executable and it will be self contained, so you won't need to install Qt (and other app dependencies) on the server.

      ./test2: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./test2)
      

      It seems something is wrong with your glibc version. try: ldd --version on your machines.
      Here is what I guess:
      Your server's glibc is older than your dev machine and as far as I know you should downgrade your dev machine's glibc(probably by downgrading it's OS)

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved