netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

setup.sh: line 105 - command not found-netopeer2

Open SagarGowda89 opened this issue 3 years ago • 7 comments

Hi ,

i am getting below error

netopeer2/scripts//setup.sh: line 105: -l: command not found
netopeer2/scripts//setup.sh: line 59: : command not found

i can see issue in setup.sh as follows

# optional env variable override
if [ -n "$SYSREPOCTL_EXECUTABLE" ]; then
    SYSREPOCTL="$SYSREPOCTL_EXECUTABLE"
# avoid problems with sudo PATH
elif [ `id -u` -eq 0 ]; then
    SYSREPOCTL=`su -c 'command -v sysrepoctl' -l $USER`
else
    SYSREPOCTL=`command -v sysrepoctl`
fi

i have not exported any env data for "SYSREPOCTL_EXECUTABLE" still it is entering if statement and "$SYSREPOCTL_EXECUTABLE" have no data.

can i know why ?

SagarGowda89 avatar Mar 01 '22 14:03 SagarGowda89

What version of Netopeer2 (which git branch, and which commit) are you using? There's been a recent fix in the devel branch that might fix this issue.

jktjkt avatar Mar 01 '22 14:03 jktjkt

I am using Netopeer2 [2.0.35] master branch.

i have tried in development branch also i am facing same issue for "make install"

netopeer2/scripts//setup.sh: line 102: -l: command not found netopeer2/scripts//setup.sh: line 56: : command not found CMake Error at cmake_install.cmake:85 (message): scripts/setup.sh failed: 127

make: *** [Makefile:86: install] Error 1

SagarGowda89 avatar Mar 01 '22 14:03 SagarGowda89

Please post the full log of the configure and build and installation of the devel branch.

jktjkt avatar Mar 01 '22 15:03 jktjkt

yes sure,

root@labadmin:~sysrepo/netopeer2/build# cmake -DCMAKE_INSTALL_PREFIX:PATH=/sysrepo/install_libs .. -- The C compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") Package libnetconf2 was not found in the pkg-config search path. Perhaps you should add the directory containing `libnetconf2.pc' to the PKG_CONFIG_PATH environment variable No package 'libnetconf2' found -- Unable to learn libnetconf2 thread support, check skipped CMake Warning at CMakeLists.txt:170 (message): valgrind executable not found! Disabling memory leaks tests.

-- Could NOT find CMocka (missing: CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) (Required is at least version "1.0.1") -- Disabling tests because of missing CMocka -- Could NOT find Uncrustify (missing: UNCRUSTIFY) (Required is at least version "0.71") -- Found OpenSSL: /sysrepo/install_libs/lib/libcrypto.so (found version "1.1.1d") -- Found LibSSH: /sysrepo/install_libs/include (found suitable version "0.8.90", minimum required is "0.7.1") -- Found LibNETCONF2: /sysrepo/install_libs/lib/libnetconf2.so -- Looking for NC_ENABLED_SSH -- Looking for NC_ENABLED_SSH - found -- Looking for NC_ENABLED_TLS -- Looking for NC_ENABLED_TLS - found -- Looking for vdprintf -- Looking for vdprintf - found -- Looking for asprintf -- Looking for asprintf - found -- Looking for vasprintf -- Looking for vasprintf - found -- Looking for getline -- Looking for getline - found -- Looking for strndup -- Looking for strndup - found -- Looking for strnstr -- Looking for strnstr - not found -- Looking for strdupa -- Looking for strdupa - found -- Looking for strchrnul -- Looking for strchrnul - found -- Looking for get_current_dir_name -- Looking for get_current_dir_name - found -- Looking for pthread_mutex_timedlock -- Looking for pthread_mutex_timedlock - found -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h CMake Warning (dev) at /usr/share/cmake-3.16/Modules/CheckIncludeFile.cmake:80 (message): Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

CMAKE_REQUIRED_LIBRARIES is set to:

pthread

For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/CheckTypeSize.cmake:230 (check_include_file) /usr/share/cmake-3.16/Modules/TestBigEndian.cmake:33 (CHECK_TYPE_SIZE) CMakeModules/UseCompat.cmake:46 (TEST_BIG_ENDIAN) CMakeLists.txt:236 (use_compat) This warning is for project developers. Use -Wno-dev to suppress it.

-- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Looking for stdatomic.h -- Looking for stdatomic.h - found -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) -- libcurl not found, url capability will not be supported -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found LibYANG: /sysrepo/install_libs/lib/libyang.so (found suitable version "2.13.7", minimum required is "2") -- Found Sysrepo: /sysrepo/install_libs/lib/libsysrepo.so (found suitable version "6.4.19", minimum required is "6.4.0") -- Looking for eaccess -- Looking for eaccess - found -- Looking for mkstemps -- Looking for mkstemps - found -- Configuring done -- Generating done -- Build files have been written to: /sysrepo/netopeer2/build root@labadmin:~sysrepo/netopeer2/build#

root@labadmin:~/ sysrepo/netopeer2/build# make Scanning dependencies of target serverobj [ 4%] Building C object CMakeFiles/serverobj.dir/src/common.c.o [ 8%] Building C object CMakeFiles/serverobj.dir/src/netconf.c.o [ 12%] Building C object CMakeFiles/serverobj.dir/src/netconf_monitoring.c.o [ 16%] Building C object CMakeFiles/serverobj.dir/src/netconf_acm.c.o [ 20%] Building C object CMakeFiles/serverobj.dir/src/netconf_nmda.c.o [ 25%] Building C object CMakeFiles/serverobj.dir/src/netconf_subscribed_notifications.c.o [ 29%] Building C object CMakeFiles/serverobj.dir/src/netconf_confirmed_commit.c.o [ 33%] Building C object CMakeFiles/serverobj.dir/src/subscribed_notifications.c.o [ 37%] Building C object CMakeFiles/serverobj.dir/src/yang_push.c.o [ 41%] Building C object CMakeFiles/serverobj.dir/src/log.c.o [ 45%] Building C object CMakeFiles/serverobj.dir/src/err_netconf.c.o [ 50%] Building C object CMakeFiles/serverobj.dir/src/netconf_server.c.o [ 54%] Building C object CMakeFiles/serverobj.dir/src/netconf_server_ssh.c.o [ 58%] Building C object CMakeFiles/serverobj.dir/src/netconf_server_tls.c.o [ 58%] Built target serverobj Scanning dependencies of target netopeer2-server [ 62%] Building C object CMakeFiles/netopeer2-server.dir/src/main.c.o [ 66%] Building C object CMakeFiles/netopeer2-server.dir/compat/compat.c.o [ 70%] Linking C executable netopeer2-server [ 70%] Built target netopeer2-server Scanning dependencies of target netopeer2-cli [ 75%] Building C object cli/CMakeFiles/netopeer2-cli.dir/main.c.o [ 79%] Building C object cli/CMakeFiles/netopeer2-cli.dir/commands.c.o [ 83%] Building C object cli/CMakeFiles/netopeer2-cli.dir/completion.c.o [ 87%] Building C object cli/CMakeFiles/netopeer2-cli.dir/configuration.c.o [ 91%] Building C object cli/CMakeFiles/netopeer2-cli.dir/linenoise/linenoise.c.o [ 95%] Building C object cli/CMakeFiles/netopeer2-cli.dir/__/compat/compat.c.o [100%] Linking C executable ../netopeer2-cli [100%] Built target netopeer2-cli root@labadmin:~/ sysrepo/netopeer2/build#

root@labadmin:~/sysrepo/netopeer2/build# make install [ 58%] Built target serverobj [ 70%] Built target netopeer2-server [100%] Built target netopeer2-cli Install the project... -- Install configuration: "Debug" -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2 -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Up-to-date: /sysrepo/install_libs/share/yang/modules/netopeer2/[email protected] -- Installing: /sysrepo/install_libs/bin/netopeer2-server -- Set runtime path of "/sysrepo/install_libs/bin/netopeer2-server" to "" -- Up-to-date: /sysrepo/install_libs/share/man/man8/netopeer2-server.8 -- Installing missing sysrepo modules... /sysrepo/netopeer2/scripts//setup.sh: line 102: -l: command not found /sysrepo/netopeer2/scripts//setup.sh: line 56: : command not found CMake Error at cmake_install.cmake:85 (message): scripts/setup.sh failed: 127

make: *** [Makefile:86: install] Error 1 root@labadmin:~/sysrepo/netopeer2/build#

SagarGowda89 avatar Mar 01 '22 15:03 SagarGowda89

What commit are you on? This looks like you haven't updated to 05d9ac4 yet.

jktjkt avatar Mar 01 '22 18:03 jktjkt

Development Branch expecting LIBNETCONF2_INCLUDE_DIR) (Required is at least version "3.1.0"). But i can see only available version is 2.0.24

SagarGowda89 avatar Mar 08 '22 07:03 SagarGowda89

Most recent versions are always found in the devel branch in our projects.

michalvasko avatar Mar 09 '22 09:03 michalvasko