Portál AbcLinuxu, 14. května 2025 16:43
E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
# dpkg -l | grep gcc ii gcc 4:5.3.1-1ubuntu1 amd64 GNU C compiler ii gcc-4.8 4.8.5-4ubuntu2 amd64 GNU C compiler ii gcc-4.8-base:amd64 4.8.5-4ubuntu2 amd64 GCC, the GNU Compiler Collection (base package) ii gcc-4.9-base:amd64 4.9.3-13ubuntu2 amd64 GCC, the GNU Compiler Collection (base package) ii gcc-5 5.4.0-6ubuntu1~16.04.4 amd64 GNU C compiler ii gcc-5-base:amd64 5.4.0-6ubuntu1~16.04.4 amd64 GCC, the GNU Compiler Collection (base package) ii gcc-6-base:amd64 6.0.1-0ubuntu1 amd64 GCC, the GNU Compiler Collection (base package) ii libcaca0:amd64 0.99.beta19-2build2~gcc5.2 amd64 colour ASCII art library ii libgcc-4.8-dev:amd64 4.8.5-4ubuntu2 amd64 GCC support library (development files) ii libgcc-5-dev:amd64 5.4.0-6ubuntu1~16.04.4 amd64 GCC support library (development files) ii libgcc1:amd64 1:6.0.1-0ubuntu1 amd64 GCC support libraryTyto balíčky jsem zkousli přeinstalovat pomocí apt install --reinstall, k tomu ještě pár dalších (lib32gcc1 libcc1-0:amd64 libgcc1:amd64 libisccc140:amd64), ale nepomohlo. Potřeboval bych tedy nějak nasměrovat co vyzkoušet a jak stav opravit. Mám nějaký kód, který na čistém Ubuntu kompiluji bez problému, ale na tomto stroji končím vždy na uvedené nebo podobné hlášce - Command line option ... is not understood in combination with the other options.
4# gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Díky za rady.
Řešení dotazu:
-s, --silent, --quiet
Silent operation; do not print the commands as they are executed.
# make
gcc -pipe -g -O2 -D_GNU_SOURCE -DUSE_PTHREADS -DHT_INLINE -DHAVE_ICONV -DNDEBUG -Wall -Wextra -Wno-unused-parameter -Wno-unused -fvisibility=hidden -fPIC -fpic -fpie -pie -I./iniparser/src/ -I./libev/ -I./libebb/ -pthread -DVERSION=\"0.2.4\" -c -o server.o server.c
E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
Makefile:14: recipe for target 'server.o' failed
make: *** [server.o] Error 1
# gcc -o server.o server.c
E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
gcc hello.c -o hello E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
set -x gcc hello.c -o hellopm
/# set -x + set -x ++ pwd ++ kill -STOP 13892 /# gcc hello.c -o hello + gcc hello.c -o hello E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
To začíná být zajímavé…
Tak zkuste ještě přidat "-v" a jestli ani to neukáže, kde se to vzalo, tak spusťte "strace -f -o log gcc -o hello hello.c
" a dejte sem výsledný gcc.log jako přílohu.
Ještě možná
set | grep -C 3 -- -quiet
by mohl ukázat něco zajímavého.
# set | grep -C 3 -- -quiet else if [ "true" = "$inside_worktree" ]; then if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] && [ "$(git config --bool bash.showDirtyState)" != "false" ]; then git diff --no-ext-diff --quiet || w="*"; git diff --no-ext-diff --cached --quiet || i="+"; if [ -z "$short_sha" ] && [ -z "$i" ]; then i="#"; fi; fi; if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] && git rev-parse --verify --quiet refs/stash > /dev/null; then s="$"; fi; if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] && [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] && git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' > /dev/null 2> /dev/null; then
# set -x + set -x ++ pwd ++ kill -STOP 30461 # gcc -v hello.c -o hello + gcc -v hello.c -o hello Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) COLLECT_GCC_OPTIONS='-v' '-o' 'hello' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/5/cc1 -quiet -v -imultiarch x86_64-linux-gnu hello.c -quiet -dumpbase hello.c -mtune=generic -march=x86-64 -auxbase hello -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/cc1s9zs0.s E: Command line option 'u' [from -quiet] is not understood in combination with the other options. ++ pwd ++ kill -STOP 30461
-quiet
" objevuje, ale jako parametr cc1
by to mělo být v pořádku (aspoň to tak funguje s gcc 4.8 i gcc 6). Hlavně ale ta chybová hláška vůbec nevypadá jako od gcc… Nezkoušel jste instalovat nějaký jiný překladač, který by se zkoušel vydávat za gcc?
CC=gcc-4.9 make
# gcc-4.9 hello.c -o hello root@stream-06:/# ./hello hello
apt install --reinstall binutils cpp cpp-5 gcc-5 gcc-5-base libasan2 libatomic1 libc-dev-bin libc6 libc6-dev libcc1-0 libcilkrts5 libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libquadmath0 libstdc++6 libtsan0 libubsan0 linux-libc-dev manpages-dev
which gcc type gcc whereis gcc alias gccA případně proměnné (ty ale gcc přímo neovlivní, jen make)
echo $CFLAGS echo $CCTak jsem postupně zkoušel ručně stahovat a přes dpkg instalovat balíčky i závislosti pro gcc, nepomohlo nic. Tady bych se bál, že si spíš systém rozbijete, než opravíte. Raději použít apt, než ručně instalovat.
# which gcc /usr/bin/gcc # type gcc gcc is /usr/bin/gcc # whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz # alias gcc -bash: alias: gcc: not found # echo $CFLAGS {nic} # echo $CC {nic}
E: Command line option 'u' [from -quiet] is not understood in combination with the other options.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.