Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, When i run an exisiting executable i got this Code: # ./cancount -sh: ./cancount: No such file or directory these are couple of outputs Code: 4904 8 -rwxrwxrwx 1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    15

    No such file or Directory


    Hi,

    When i run an exisiting executable i got this
    Code:
    # ./cancount
    -sh: ./cancount: No such file or directory
    these are couple of outputs
    Code:
    4904 8 -rwxrwxrwx 1 root root 6864 Apr 19 14:42 cancount*
    4897 8 -rw------- 1 root root 5232 Apr 19 14:42 cancount.c
    Code:
    # file cancount
    cancount: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
    Code:
    # ldd cancount 
    -sh: ldd: command not found
    # ld cancount
    ld: cancount: access beyond end of merged section (35444)

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,533
    Well, looking at the source, your Makefile (if you have one - if not, then compiler options), and the build output would help.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Feb 2013
    Posts
    15
    Quote Originally Posted by Rubberman View Post
    Well, looking at the source, your Makefile (if you have one - if not, then compiler options), and the build output would help.
    I'm too noob to do this shall i post some output so that you can help me ?

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Quote Originally Posted by nymar View Post
    I'm too noob to do this shall i post some output so that you can help me ?
    Did you 'cd' into the binaries directory before performing
    Code:
    # ./cancount
    ?

    Try with absolute pathname something like
    /home/nymar/path/to/cancount
    If that didn't work post output of

    stat cancount
    How did you create that binary file ?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  5. #5
    Just Joined!
    Join Date
    Feb 2013
    Posts
    15
    Quote Originally Posted by Lakshmipathi View Post
    Did you 'cd' into the binaries directory before performing
    Code:
    # ./cancount
    ?

    Try with absolute pathname something like


    If that didn't work post output of



    How did you create that binary file ?
    yes i run it from the directory that contains it.
    i get it from a driver file (kvaser.com/index.php?option=com_php&Itemid=258&eaninput=73301 30001596]kvaser.com - Kvaser USBcan II HS/HS[/url]) it's a code for an example.
    I think the problem is from my rootfs. Maybe i have missing libs

  6. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Exclamation

    that link not working for me. Anyway , Can you try to installing ldd -If you are using Redhat/Fedora/Centos - do 'yum install glibc-common'.

    Check whether ldd shows any missing files.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  7. #7
    Just Joined!
    Join Date
    Feb 2013
    Posts
    15
    Quote Originally Posted by Lakshmipathi View Post
    that link not working for me. Anyway , Can you try to installing ldd -If you are using Redhat/Fedora/Centos - do 'yum install glibc-common'.

    Check whether ldd shows any missing files.
    I'm very sorry i forgot to tell you i'm working on RaspberryPI Arch distro. I'm sorry.
    I noticed something after compiling them in pc and sendin them to Raspberry PI the executable files change name frome cancount to cancount* so there is a "*" added to all exec files !!
    this is the makefile that i used to compile them
    Code:
    CC = gcc
    CFLAGS = -Wall -O2  -D_REENTRANT $(XTRA_CFLAGS) -I../../include
    LDFLAGS = -L..
    LDLIBS = -lcanlib -lpthread
    OBJS = busparms readTimerTest canmonitor writeloop cancount simplewrite listChannels
    
    ifeq ($(KV_DEBUG_ON),1)
      KV_XTRA_CFLAGS_DEBUG= -D_DEBUG=1 -DDEBUG=1 
      IS_DEBUG=Debug: $(KV_XTRA_CFLAGS_DEBUG)
      CFLAGS += $(KV_XTRA_CFLAGS_DEBUG)
    else
      KV_XTRA_CFLAGS_DEBUG= -D_DEBUG=0 -DDEBUG=0
      CFLAGS += $(KV_XTRA_CFLAGS_DEBUG)
    endif
    
    sub:	$(OBJS)	
    	@echo --------------------------------------------------------------------
    	@echo "Built examples $(IS_DEBUG)"
    	@echo --------------------------------------------------------------------
    
    all:	sub
    
    install:
    	@echo --------------------------------------------------------------------
    	@echo "Installing examples into /usr/doc/canlib"
    	@echo --------------------------------------------------------------------
    	mkdir -p /usr/doc/canlib
    	cp -r . /usr/doc/canlib/examples
    
    clean:	
    	rm -f $(OBJS) *.o *~

  8. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Quote Originally Posted by nymar View Post
    I'm very sorry i forgot to tell you i'm working on RaspberryPI Arch distro. I'm sorry.
    I noticed something after compiling them in pc and sendin them to Raspberry PI the executable files change name frome cancount to cancount* so there is a "*" added to all exec files !!
    [/CODE]
    I never played with Raspberry pi so running out of options - may be try renaming file cancount* to cancount? or try executing it as "./cancount\*" ?

    I'm not sure
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •