Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

./h265ize: 5: ./h265ize: declare: not found #1

Closed
dausruddin opened this issue Apr 10, 2015 · 17 comments
Closed

./h265ize: 5: ./h265ize: declare: not found #1

dausruddin opened this issue Apr 10, 2015 · 17 comments
Assignees
Labels

Comments

@dausruddin
Copy link

I run this script as a normal user.Got this errors

./h265ize: 5: ./h265ize: declare: not found
./h265ize: 6: ./h265ize: Syntax error: word unexpected (expecting ")")
@FallingSnow
Copy link
Owner

Are you using the bash or sh shell?

@FallingSnow
Copy link
Owner

Try doing 'sh h265ize' instead of './h265ize'.

@dausruddin
Copy link
Author

both produced same error. Your script compatible with user without sudo? I havent tried run it with sudo yet

@FallingSnow
Copy link
Owner

I can't imagine anything that would require sudo. Just tried it on a user account. Worked just fine. Can you try running the command 'declare'.

@FallingSnow
Copy link
Owner

BTW, you aren't running this on any specialized hardware right, like a rasp pi or using cygwin?

@dausruddin
Copy link
Author

It shows many lines of codes

@FallingSnow
Copy link
Owner

Hmmm. Then it should be working. Is that all the output you get when you try running it?

@FallingSnow FallingSnow self-assigned this Apr 11, 2015
@dausruddin
Copy link
Author

Yup. Only that. I reinstalled my server just to use your script😅
Installing Handbrake is easier with aptitude on ubuntu 14.04

@FallingSnow
Copy link
Owner

:( now I have to make sure you can get it running :D
Try 'echo "declare" | sh'... Same output as running declare?

@dausruddin
Copy link
Author

This is the full output. Hope it helps.

declare as root

$ declare
BASH=/bin/bash
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:histappend:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="3" [2]="11" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.3.11(1)-release'
COLUMNS=79
DIRSTACK=()
EUID=0
GROUPS=()
HISTCONTROL=ignoredups:ignorespace
HISTFILE=/root/.bash_history
HISTFILESIZE=2000
HISTSIZE=1000
HOME=/root
HOSTNAME=sd-51420
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=en_US.UTF-8
LESSCLOSE='/usr/bin/lesspipe %s %s'
LESSOPEN='| /usr/bin/lesspipe %s'
LINES=24
LOGNAME=root
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'
MACHTYPE=x86_64-pc-linux-gnu
MAIL=/var/mail/root
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PIPESTATUS=([0]="0")
PPID=14945
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS2='> '
PS4='+ '
PWD=/home/psycholyzern
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
SUDO_COMMAND=/bin/su
SUDO_GID=1000
SUDO_UID=1000
SUDO_USER=psycholyzern
TERM=xterm
UID=0
USER=root
USERNAME=root
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_ID=2
_=declare
command_not_found_handle ()
{
    if [ -x /usr/lib/command-not-found ]; then
        /usr/lib/command-not-found -- "$1";
        return $?;
    else
        if [ -x /usr/share/command-not-found/command-not-found ]; then
            /usr/share/command-not-found/command-not-found -- "$1";
            return $?;
        else
            printf "%s: command not found\n" "$1" 1>&2;
            return 127;
        fi;
    fi
}

declare | sh as root

sh: 3: Syntax error: "(" unexpected

declare as non-root user

http://pastebin.com/Q8uz9i5K (output is to long)

declare | sh as non-root user

sh: 3: Syntax error: "(" unexpected
-bash: declare: write error: Broken pipe

@FallingSnow
Copy link
Owner

What output do you get when you run sh --version?

@dausruddin
Copy link
Author

sh: 0: Illegal option --

Is there something wrong ? T_T

@FallingSnow
Copy link
Owner

Lol. You definitely have a strange version of sh installed. Idk how in ubuntu but you might want to try to update sh.
Mine comes out as

root@sparling ~ # sh --version
GNU bash, version 4.3.33(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@dausruddin
Copy link
Author

Im using Ubuntu 14.04.. You?

@FallingSnow
Copy link
Owner

Arch Linux.

@FallingSnow
Copy link
Owner

A quick fix might be changing the first line #/bin/sh to #!/bin/bash.

Edit: So ummm it's suppose to be #!/bin/bash not #/bin/sh fixed it in the code, but I tested it and it shouldn't have effected the script. Turns out I had been running it like that all this time.

Edit 2: I just changed it to bash. You shouldn't have any problems now. Redownload the script and tell me if your still having problems.

@dausruddin
Copy link
Author

Nice! You fix it. I did a search on google and turn out #! was the problem. Then I see you fix the code.
Problem solved and now I just need a video to be converted. Thanks for your great work :)
Btw, sorry the late reply.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants