在ubuntu下编译x264时遇到配置命令未找到的问题

sh/bash/dash/ksh/zsh等Shell脚本
回复
5303363
帖子: 3
注册时间: 2016-02-19 23:49
系统: Win7&Ubuntu15

在ubuntu下编译x264时遇到配置命令未找到的问题

#1

帖子 5303363 » 2016-04-29 11:47

这是我的.sh文件

代码: 全选

#!/bin/sh
NDK=/home/android-ndk-r9d
PLATFORM=$NDK/platforms/android-9/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt

PREFIX=/home/x264/ffmpeglib

./configure --prefix=$PREFIX 
  --disable-static 
  --enable-shared
  --enable-pic 
  --disable-asm 
  --disable-cli 
  --host=arm-linux 
  --cross-prefix=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi- 
  --sysroot=$PLATFORM

make
make install
提示如下错误,我也问了度娘,度娘说好像也不清楚

代码: 全选

root@ubuntu:/home/x264# ./m.sh
platform:      X86_64
byte order:    little-endian
system:        LINUX
cli:           yes
libx264:       internal
shared:        no
static:        no
asm:           yes
interlaced:    yes
avs:           avxsynth
lavf:          yes
ffms:          no
mp4:           no
gpl:           yes
thread:        posix
opencl:        yes
filters:       resize crop select_every 
debug:         no
gprof:         no
strip:         no
PIC:           no
bit depth:     8
chroma format: all

You can run 'make' or 'make fprofiled' now.
./m.sh: 9: ./m.sh: --disable-static: not found
./m.sh: 10: ./m.sh: --enable-shared: not found
./m.sh: 11: ./m.sh: --enable-pic: not found
./m.sh: 12: ./m.sh: --disable-asm: not found
./m.sh: 13: ./m.sh: --disable-cli: not found
./m.sh: 14: ./m.sh: --host=arm-linux: not found
./m.sh: 15: ./m.sh: --cross-prefix=/home/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-: not found
./m.sh: 16: ./m.sh: --sysroot=/home/android-ndk-r9d/platforms/android-9/arch-arm/: not found
dependency file generation...
gcc -Wno-maybe-uninitialized -Wshado
头像
astolia
论坛版主
帖子: 6447
注册时间: 2008-09-18 13:11

Re: 在ubuntu下编译x264时遇到配置命令未找到的问题

#2

帖子 astolia » 2016-04-29 18:12

命令是按行处理的,不要随意换行。如果一定要分多行写,在行尾加上\,才会让shell知道下一行是本行的延续
回复