AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-296836

Martin Bramwell's questions

Martin Hope
Martin Bramwell
Asked: 2021-04-26 06:37:52 +0800 CST

sudo -A 忽略我的 SUDO_ASKPASS 变量

  • 1

sudo -A 忽略 SUDO_ASKPASS 变量

我一直在使用sudo -A并且SUDO_ASKPASS多年来没有遇到任何问题。

我有一个新安装的 Xubuntu Focal Fossa 工作站,但我无法sudo -A上班

我有:

me@mine:~$ cat .ssh/secrets/.supwd.sh
#!/bin/bash
echo 'SECRET'

me@mine:~$ ll .ssh/secrets/.supwd.sh
-rwx------ 1 me me 27 Apr 25 10:25 .ssh/secrets/.supwd.sh*

me@mine:~$ cat .bash_profile 
SUDO_ASKPASS=${HOME}/.ssh/secrets/.supwd.sh

me@mine:~$ source .bash_profile 

me@mine:~$ echo ${SUDO_ASKPASS}
/home/me/.ssh/secrets/.supwd.sh

me@mine:~$ ${SUDO_ASKPASS}
SECRET

me@mine:~$ sudo -A reboot now
sudo: no askpass program specified, try setting SUDO_ASKPASS

me@mine:~$ 

我到底忘记了什么?

bash
  • 1 个回答
  • 512 Views
Martin Hope
Martin Bramwell
Asked: 2021-04-03 06:58:23 +0800 CST

如何解决这个我讨厌但无法简要描述的琐碎事情?

  • 8

我目前正在使用 Xubuntu 20.04,但这多年来一直困扰着我。

因此,我在新文档中进行了一些更改并保存它:

在此处输入图像描述

选定的文本Untitled Document 1表明任何 UX 标准都非常清楚,我输入的下一个内容将替换该文本,对吗?

好吧,不:

在此处输入图像描述

它开始搜索我要保存的不存在的文档???我每次都抓到我;我输入名称,点击save然后发现我已经保存了Untitled Document 1!呸!

这是可配置的吗?不会惹恼别人吗?

我对 Linux 应用程序开发知之甚少,但我猜这个“文件保存”对话框是 C 语言应用程序的一部分。开发。框架。哪一个?来源在哪里,所以我可以发布问题,或者查看是否有其他人发布了问题?

我担心我会因为抱怨不打扰别人的事情而被否决,但是在这件事上绊倒了 10 年之后,每次都很少被它抓住,我很想知道其他人的想法。

更新(同一天):非常感谢所有支持的评论! 谢谢!

似乎与按钮的可见性有关。就我而言,我非常习惯能够做到,简单地说:

<ctrl-s>
navigate to target directory
type doc name
<enter>

如果我在滚动,我几乎不会看我输入的内容,当然也不想看我输入的内容。

还!正如评论中所讨论的,只有当我导航到目标目录时才会发生这种情况!

xubuntu
  • 1 个回答
  • 121 Views
Martin Hope
Martin Bramwell
Asked: 2019-12-27 06:59:37 +0800 CST

安装 libmtp 时:“collect2:错误:ld 返回 1 退出状态”。如何调试/修复?

  • 0

按照这些说明解决libmtp问题...

https://askubuntu.com/a/886986/296836

...我收到这些错误...

../src/.libs/libmtp.so: undefined reference to `usb_claim_interface'
../src/.libs/libmtp.so: undefined reference to `usb_get_string_simple'
../src/.libs/libmtp.so: undefined reference to `usb_detach_kernel_driver_np'
../src/.libs/libmtp.so: undefined reference to `usb_get_descriptor'
../src/.libs/libmtp.so: undefined reference to `usb_get_busses'
collect2: error: ld returned 1 exit status
Makefile:506: recipe for target 'mtp-connect' failed
make[2]: *** [mtp-connect] Error 1
make[2]: Leaving directory '/tmp/mozilla_hasan0/libmtp-1.1.15/examples'
Makefile:526: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/mozilla_hasan0/libmtp-1.1.15'
Makefile:389: recipe for target 'all' failed
make: *** [all] Error 2

指示的步骤是:

sudo apt-get install build-essential
./configure --prefix=/usr 
make

make来自 JavaScript/Python 生态系统,我对and的经验很少configure,因此非常感谢任何帮助。

这是一个明显的错误吗?我能做些什么来追查原因?

完整的日志在下面...


完整日志:

./configure --prefix=/usr 
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$ ./configure --prefix=/usr 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether ln -s works... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by gcc... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for doxygen... false
checking if the host operating system is Darwin... no
checking if the host operating system is Linux... yes
checking For MinGW32... no
checking for pkg-config... no
checking for libusb-1.0 >= 1.0.0... no
checking for openusb_init in -lopenusb... no
checking for libusb >= 0.1.8... no
checking for usb_open in -lusb... yes
checking for libgcrypt... checking for gcry_check_version in -lgcrypt... no
configure: *** libgcrypt not found - disabling MTPZ support ***
configure: MTPZ functionality disable
configure: *** using libusb 0.1 ***
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for string.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for struct stat.st_blksize... yes
checking for working memcmp... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for basename... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strndup... yes
checking for strrchr... yes
checking for strtoul... yes
checking for usleep... yes
checking for mkstemp... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for uint8_t in stdint.h... yes
checking whether byte ordering is bigendian... no
checking for le32toh in machine/endian.h... no
checking for ntohl in arpa/inet.h... yes
checking for swap32 in machine/endian.h... no
checking for bswap_32 in byteswap.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating src/libmtp.h
config.status: creating doc/Doxyfile
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating util/Makefile
config.status: creating libmtp.sh
config.status: creating hotplug.sh
config.status: creating libmtp.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$
make
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$ make
make  all-recursive
make[1]: Entering directory '/tmp/mozilla_hasan0/libmtp-1.1.15'
Making all in src
make[2]: Entering directory '/tmp/mozilla_hasan0/libmtp-1.1.15/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libmtp.lo -MD -MP -MF .deps/libmtp_la-libmtp.Tpo -c -o libmtp_la-libmtp.lo `test -f 'libmtp.c' || echo './'`libmtp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libmtp.lo -MD -MP -MF .deps/libmtp_la-libmtp.Tpo -c libmtp.c  -fPIC -DPIC -o .libs/libmtp_la-libmtp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libmtp.lo -MD -MP -MF .deps/libmtp_la-libmtp.Tpo -c libmtp.c -o libmtp_la-libmtp.o >/dev/null 2>&1
mv -f .deps/libmtp_la-libmtp.Tpo .deps/libmtp_la-libmtp.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-unicode.lo -MD -MP -MF .deps/libmtp_la-unicode.Tpo -c -o libmtp_la-unicode.lo `test -f 'unicode.c' || echo './'`unicode.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-unicode.lo -MD -MP -MF .deps/libmtp_la-unicode.Tpo -c unicode.c  -fPIC -DPIC -o .libs/libmtp_la-unicode.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-unicode.lo -MD -MP -MF .deps/libmtp_la-unicode.Tpo -c unicode.c -o libmtp_la-unicode.o >/dev/null 2>&1
mv -f .deps/libmtp_la-unicode.Tpo .deps/libmtp_la-unicode.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-util.lo -MD -MP -MF .deps/libmtp_la-util.Tpo -c -o libmtp_la-util.lo `test -f 'util.c' || echo './'`util.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-util.lo -MD -MP -MF .deps/libmtp_la-util.Tpo -c util.c  -fPIC -DPIC -o .libs/libmtp_la-util.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-util.lo -MD -MP -MF .deps/libmtp_la-util.Tpo -c util.c -o libmtp_la-util.o >/dev/null 2>&1
mv -f .deps/libmtp_la-util.Tpo .deps/libmtp_la-util.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-playlist-spl.lo -MD -MP -MF .deps/libmtp_la-playlist-spl.Tpo -c -o libmtp_la-playlist-spl.lo `test -f 'playlist-spl.c' || echo './'`playlist-spl.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-playlist-spl.lo -MD -MP -MF .deps/libmtp_la-playlist-spl.Tpo -c playlist-spl.c  -fPIC -DPIC -o .libs/libmtp_la-playlist-spl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-playlist-spl.lo -MD -MP -MF .deps/libmtp_la-playlist-spl.Tpo -c playlist-spl.c -o libmtp_la-playlist-spl.o >/dev/null 2>&1
mv -f .deps/libmtp_la-playlist-spl.Tpo .deps/libmtp_la-playlist-spl.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-ptp.lo -MD -MP -MF .deps/libmtp_la-ptp.Tpo -c -o libmtp_la-ptp.lo `test -f 'ptp.c' || echo './'`ptp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-ptp.lo -MD -MP -MF .deps/libmtp_la-ptp.Tpo -c ptp.c  -fPIC -DPIC -o .libs/libmtp_la-ptp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-ptp.lo -MD -MP -MF .deps/libmtp_la-ptp.Tpo -c ptp.c -o libmtp_la-ptp.o >/dev/null 2>&1
mv -f .deps/libmtp_la-ptp.Tpo .deps/libmtp_la-ptp.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libusb-glue.lo -MD -MP -MF .deps/libmtp_la-libusb-glue.Tpo -c -o libmtp_la-libusb-glue.lo `test -f 'libusb-glue.c' || echo './'`libusb-glue.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libusb-glue.lo -MD -MP -MF .deps/libmtp_la-libusb-glue.Tpo -c libusb-glue.c  -fPIC -DPIC -o .libs/libmtp_la-libusb-glue.o
libusb-glue.c: In function ‘dump_usbinfo’:
libusb-glue.c:706:7: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
   int res;
       ^~~
At top level:
libusb-glue.c:1815:13: warning: ‘clear_halt’ defined but not used [-Wunused-function]
 static void clear_halt(PTP_USB* ptp_usb)
             ^~~~~~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wmissing-prototypes -MT libmtp_la-libusb-glue.lo -MD -MP -MF .deps/libmtp_la-libusb-glue.Tpo -c libusb-glue.c -o libmtp_la-libusb-glue.o >/dev/null 2>&1
mv -f .deps/libmtp_la-libusb-glue.Tpo .deps/libmtp_la-libusb-glue.Plo
/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -Wmissing-prototypes -no-undefined -export-symbols ./libmtp.sym -version-info 13:0:4   -o libmtp.la -rpath /usr/lib libmtp_la-libmtp.lo libmtp_la-unicode.lo libmtp_la-util.lo libmtp_la-playlist-spl.lo libmtp_la-ptp.lo   libmtp_la-libusb-glue.lo     
libtool: link: rm -fr  .libs/libmtp.a .libs/libmtp.la .libs/libmtp.lai .libs/libmtp.so .libs/libmtp.so.9 .libs/libmtp.so.9.4.0 .libs/libmtp.ver
libtool: link: echo "{ global:" > .libs/libmtp.ver
libtool: link:  cat ./libmtp.sym | sed -e "s/\(.*\)/\1;/" >> .libs/libmtp.ver
libtool: link:  echo "local: *; };" >> .libs/libmtp.ver
libtool: link:  gcc -shared  -fPIC -DPIC  .libs/libmtp_la-libmtp.o .libs/libmtp_la-unicode.o .libs/libmtp_la-util.o .libs/libmtp_la-playlist-spl.o .libs/libmtp_la-ptp.o .libs/libmtp_la-libusb-glue.o    -g -O2   -Wl,-soname -Wl,libmtp.so.9 -Wl,-version-script -Wl,.libs/libmtp.ver -o .libs/libmtp.so.9.4.0
libtool: link: (cd ".libs" && rm -f "libmtp.so.9" && ln -s "libmtp.so.9.4.0" "libmtp.so.9")
libtool: link: (cd ".libs" && rm -f "libmtp.so" && ln -s "libmtp.so.9.4.0" "libmtp.so")
libtool: link: ar cru .libs/libmtp.a  libmtp_la-libmtp.o libmtp_la-unicode.o libmtp_la-util.o libmtp_la-playlist-spl.o libmtp_la-ptp.o libmtp_la-libusb-glue.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/libmtp.a
libtool: link: ( cd ".libs" && rm -f "libmtp.la" && ln -s "../libmtp.la" "libmtp.la" )
make[2]: Leaving directory '/tmp/mozilla_hasan0/libmtp-1.1.15/src'
Making all in examples
make[2]: Entering directory '/tmp/mozilla_hasan0/libmtp-1.1.15/examples'
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT connect.o -MD -MP -MF .deps/connect.Tpo -c -o connect.o connect.c
mv -f .deps/connect.Tpo .deps/connect.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT delfile.o -MD -MP -MF .deps/delfile.Tpo -c -o delfile.o delfile.c
mv -f .deps/delfile.Tpo .deps/delfile.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT getfile.o -MD -MP -MF .deps/getfile.Tpo -c -o getfile.o getfile.c
mv -f .deps/getfile.Tpo .deps/getfile.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT newfolder.o -MD -MP -MF .deps/newfolder.Tpo -c -o newfolder.o newfolder.c
mv -f .deps/newfolder.Tpo .deps/newfolder.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT sendfile.o -MD -MP -MF .deps/sendfile.Tpo -c -o sendfile.o sendfile.c
mv -f .deps/sendfile.Tpo .deps/sendfile.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT sendtr.o -MD -MP -MF .deps/sendtr.Tpo -c -o sendtr.o sendtr.c
mv -f .deps/sendtr.Tpo .deps/sendtr.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I../src   -g -O2 -Wall -Wmissing-prototypes -MT pathutils.o -MD -MP -MF .deps/pathutils.Tpo -c -o pathutils.o pathutils.c
pathutils.c: In function ‘progress’:
pathutils.c:122:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka const long unsigned int}’ [-Wformat=]
   printf("Progress: %llu of %llu (%d%%)\r", sent, total, percent);
                     ~~~^
                     %lu
pathutils.c:122:32: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t {aka const long unsigned int}’ [-Wformat=]
   printf("Progress: %llu of %llu (%d%%)\r", sent, total, percent);
                             ~~~^
                             %lu
mv -f .deps/pathutils.Tpo .deps/pathutils.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -Wmissing-prototypes   -o mtp-connect connect.o delfile.o getfile.o newfolder.o sendfile.o sendtr.o pathutils.o util.o ../src/libmtp.la 
libtool: link: gcc -g -O2 -Wall -Wmissing-prototypes -o .libs/mtp-connect connect.o delfile.o getfile.o newfolder.o sendfile.o sendtr.o pathutils.o util.o  ../src/.libs/libmtp.so
../src/.libs/libmtp.so: undefined reference to `usb_get_driver_np'
../src/.libs/libmtp.so: undefined reference to `usb_find_busses'
../src/.libs/libmtp.so: undefined reference to `usb_release_interface'
../src/.libs/libmtp.so: undefined reference to `usb_reset'
../src/.libs/libmtp.so: undefined reference to `usb_clear_halt'
../src/.libs/libmtp.so: undefined reference to `usb_find_devices'
../src/.libs/libmtp.so: undefined reference to `usb_set_configuration'
../src/.libs/libmtp.so: undefined reference to `usb_close'
../src/.libs/libmtp.so: undefined reference to `usb_device'
../src/.libs/libmtp.so: undefined reference to `usb_resetep'
../src/.libs/libmtp.so: undefined reference to `usb_control_msg'
../src/.libs/libmtp.so: undefined reference to `usb_bulk_write'
../src/.libs/libmtp.so: undefined reference to `usb_bulk_read'
../src/.libs/libmtp.so: undefined reference to `usb_init'
../src/.libs/libmtp.so: undefined reference to `usb_set_debug'
../src/.libs/libmtp.so: undefined reference to `usb_open'
../src/.libs/libmtp.so: undefined reference to `usb_claim_interface'
../src/.libs/libmtp.so: undefined reference to `usb_get_string_simple'
../src/.libs/libmtp.so: undefined reference to `usb_detach_kernel_driver_np'
../src/.libs/libmtp.so: undefined reference to `usb_get_descriptor'
../src/.libs/libmtp.so: undefined reference to `usb_get_busses'
collect2: error: ld returned 1 exit status
Makefile:506: recipe for target 'mtp-connect' failed
make[2]: *** [mtp-connect] Error 1
make[2]: Leaving directory '/tmp/mozilla_hasan0/libmtp-1.1.15/examples'
Makefile:526: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/mozilla_hasan0/libmtp-1.1.15'
Makefile:389: recipe for target 'all' failed
make: *** [all] Error 2
you@tornado:/tmp/mozilla_you0/libmtp-1.1.15$ 



command-line compiling make 18.04
  • 1 个回答
  • 3016 Views
Martin Hope
Martin Bramwell
Asked: 2019-03-29 10:01:46 +0800 CST

由于版本阻止的依赖关系,无法安装 libnotify-dev

  • 0

步骤1 ...

sudo apt-get -y update;
sudo apt-get -y upgrade;
sudo apt-get -y dist-upgrade;
sudo apt-get -y clean;
sudo apt-get -y autoremove;

... 结果是 ...

Hit:1 https://download.sublimetext.com apt/stable/ InRelease
Hit:2 http://linux.teamviewer.com/deb stable InRelease                                                                                                 
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                                                                                             
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                           
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                      
Hit:7 http://mirror.clibre.uqam.ca/ubuntu bionic InRelease
Hit:8 http://mirror.clibre.uqam.ca/ubuntu bionic-updates InRelease
Hit:9 http://mirror.clibre.uqam.ca/ubuntu bionic-backports InRelease
Hit:10 http://mirror.clibre.uqam.ca/ubuntu bionic-security InRelease
Reading package lists... Done 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

第2步 ...

sudo apt install libnotify-dev

... 结果是 ...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libnotify-dev : Depends: libglib2.0-dev (>= 2.26) but it is not going to be installed
                 Depends: libgdk-pixbuf2.0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

步骤#3 ...

sudo aptitude install libnotify-dev

... 结果是 ...

The following NEW packages will be installed:
  gcc-8-base:i386{ab} libblkid1:i386{ab} libc6:i386{a} libelf1:i386{a} libffi6:i386{a} libgcc1:i386{ab} libgdk-pixbuf2.0-dev{a} 
  libglib2.0-0:i386{ab} libglib2.0-bin:i386{ab} libglib2.0-dev{ab} libglib2.0-dev-bin{a} libmount1:i386{ab} libnotify-dev libpcre16-3{a} 
  libpcre3:i386{a} libpcre3-dev{a} libpcre32-3{a} libpcrecpp0v5{a} libpng-dev{a} libpng-tools{a} libpthread-stubs0-dev{a} libselinux1:i386{a} 
  libuuid1:i386{ab} libx11-dev{ab} libx11-doc{a} libxau-dev{a} libxcb1-dev{a} libxdmcp-dev{a} pkg-config{a} x11proto-core-dev{a} x11proto-dev{a} 
  xorg-sgml-doctools{a} xtrans-dev{a} zlib1g:i386{a} zlib1g-dev{a} 
0 packages upgraded, 35 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives. After unpacking 48.7 MB will be used.
The following packages have unmet dependencies:
 libmount1 : Breaks: libmount1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libmount1:i386 : Breaks: libmount1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 gcc-8-base : Breaks: gcc-8-base:i386 (!= 8.2.0-1ubuntu2~18.04) but 8-20180414-1ubuntu2 is to be installed
 gcc-8-base:i386 : Breaks: gcc-8-base (!= 8-20180414-1ubuntu2) but 8.2.0-1ubuntu2~18.04 is installed
 libgcc1 : Breaks: libgcc1:i386 (!= 1:8.2.0-1ubuntu2~18.04) but 1:8-20180414-1ubuntu2 is to be installed
 libgcc1:i386 : Breaks: libgcc1 (!= 1:8-20180414-1ubuntu2) but 1:8.2.0-1ubuntu2~18.04 is installed
 libblkid1 : Breaks: libblkid1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libblkid1:i386 : Breaks: libblkid1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 libuuid1 : Breaks: libuuid1:i386 (!= 2.31.1-0.4ubuntu3.2) but 2.31.1-0.4ubuntu3.1 is to be installed
 libuuid1:i386 : Breaks: libuuid1 (!= 2.31.1-0.4ubuntu3.1) but 2.31.1-0.4ubuntu3.2 is installed
 libglib2.0-bin : Conflicts: libglib2.0-bin:i386 but 2.56.1-2ubuntu1 is to be installed
 libglib2.0-bin:i386 : Conflicts: libglib2.0-bin but 2.56.3-0ubuntu0.18.04.1 is installed
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is installed
 libx11-dev : Depends: libx11-6 (= 2:1.6.4-3) but 2:1.6.4-3ubuntu0.1 is installed
 libglib2.0-0 : Breaks: libglib2.0-0:i386 (!= 2.56.3-0ubuntu0.18.04.1) but 2.56.1-2ubuntu1 is to be installed
 libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is installed
open: 44; closed: 1251; defer: 26; conflict: 34                                                                                                        

The following actions will resolve these dependencies:

      Keep the following packages at their current version:
1)      gcc-8-base:i386 [Not Installed]                    
2)      libblkid1:i386 [Not Installed]                     
3)      libc6:i386 [Not Installed]                         
4)      libelf1:i386 [Not Installed]                       
5)      libffi6:i386 [Not Installed]                       
6)      libgcc1:i386 [Not Installed]                       
7)      libgdk-pixbuf2.0-dev [Not Installed]               
8)      libglib2.0-0:i386 [Not Installed]                  
9)      libglib2.0-bin:i386 [Not Installed]                
10)     libglib2.0-dev [Not Installed]                     
11)     libmount1:i386 [Not Installed]                     
12)     libnotify-dev [Not Installed]                      
13)     libpcre3:i386 [Not Installed]                      
14)     libselinux1:i386 [Not Installed]                   
15)     libuuid1:i386 [Not Installed]                      
16)     libx11-dev [Not Installed]                         
17)     zlib1g:i386 [Not Installed]                        



Accept this solution? [Y/n/q/?] y

...但接受只会让我...

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

版本:

lsb_release -a

...显示...

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

我该如何解决这个问题并让软件包安装?

更新 2019-03-28 18:05 EST

也试过...

sudo apt install libglib2.0-dev libgdk-pixbuf2.0-dev

...得到...

 libgdk-pixbuf2.0-dev : Depends: libx11-dev but it is not going to be installed
 libglib2.0-dev :       Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.56.3-0ubuntu0.18.04.1 is to be installed
                        Depends: libglib2.0-bin (= 2.56.1-2ubuntu1)

更新 2019-03-29 06:45 EST

根据@fkraiem 的问题:

apt-cache policy libglib2.0-dev

...产生...

libglib2.0-dev:
  Installed: (none)
  Candidate: 2.56.1-2ubuntu1
  Version table:
     2.56.1-2ubuntu1 500
        500 http://mirror.clibre.uqam.ca/ubuntu bionic/main amd64 Packages

根据@Mamayogi 表达的担忧:

dpkg --print-architecture; dpkg --print-foreign-architectures;

...产生...

amd64
i386

...但是,尽管如此,该命令sudo apt install libnotify-dev给出了与最初相同的“未满足的依赖关系”结果。

apt aptitude libnotify 18.04
  • 1 个回答
  • 1010 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve