我尝试vlc-2.1.5
使用以下配置命令从源代码安装。
./configure --prefix=/usr/ --disable-vlc --disable-lua --disable-mad --disable-swscale --disable-postproc --disable-xcb --disable-alsa
配置完美执行,没有错误。但是当我尝试时make
,我遇到了这些错误。
make[5]: Entering directory `/usr/src/vlc-2.1.5/modules/access'
CC libaccess_sftp_plugin_la-sftp.lo
sftp.c: In function �Open�:
sftp.c:152:15: error: �LIBSSH2_ERROR_EAGAIN� undeclared (first use in this function)
sftp.c:152:15: note: each undeclared identifier is reported only once for each function it appears in
sftp.c:161:5: error: implicit declaration of function �libssh2_session_set_blocking� [-Werror=implicit-function-declaration]
sftp.c:164:5: error: unknown type name �LIBSSH2_KNOWNHOSTS
sftp.c:164:5: error: implicit declaration of function �libssh2_knownhost_init� [-Werror=implicit-function-declaration]
sftp.c:164:42: warning: initialization makes pointer from integer without a cast [enabled by default]
sftp.c:172:9: error: implicit declaration of function �libssh2_knownhost_readfile� [-Werror=implicit-function-declaration]
sftp.c:173:17: error: �LIBSSH2_KNOWNHOST_FILE_OPENSSH� undeclared (first use in this function)
sftp.c:178:5: error: implicit declaration of function �libssh2_session_hostkey� [-Werror=implicit-function-declaration]
sftp.c:178:31: warning: initialization makes pointer from integer without a cast [enabled by default]
sftp.c:180:5: error: implicit declaration of function �libssh2_knownhost_check� [-Werror=implicit-function-declaration]
sftp.c:182:42: error: �LIBSSH2_KNOWNHOST_TYPE_PLAIN� undeclared (first use in this function)
sftp.c:183:42: error: �LIBSSH2_KNOWNHOST_KEYENC_RAW� undeclared (first use in this function)
sftp.c:186:5: error: implicit declaration of function �libssh2_knownhost_free� [-Werror=implicit-function-declaration]
sftp.c:191:10: error: �LIBSSH2_KNOWNHOST_CHECK_FAILURE� undeclared (first use in this function)
sftp.c:192:10: error: �LIBSSH2_KNOWNHOST_CHECK_NOTFOUND� undeclared (first use in this function)
sftp.c:195:10: error: �LIBSSH2_KNOWNHOST_CHECK_MATCH� undeclared (first use in this function)
sftp.c:198:10: error: �LIBSSH2_KNOWNHOST_CHECK_MISMATCH� undeclared (first use in this function)
cc1: some warnings being treated as errors
make[5]: *** [libaccess_sftp_plugin_la-sftp.lo] Error 1
make[5]: Leaving directory `/usr/src/vlc-2.1.5/modules/access'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/src/vlc-2.1.5/modules/access'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/vlc-2.1.5/modules/access'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/vlc-2.1.5/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/vlc-2.1.5'
make: *** [all] Error 2
然后我尝试了这个链接,但又出现同样的错误。
我的操作系统发行版是 Debian 7.5。我应该怎么做才能让错误消失?
答案1
所有这些未定义的符号 ( LIBSSH2_ERROR_EAGAIN
, ...) 属于libssh2
。您需要安装该库才能编译 VLC。由于某种原因,./configure
脚本没有警告您这一点......
您可以libssh2
从其网站下载,或者最好使用包管理器来下载。例如,与apt-get
...
$ sudo apt-get install libssh2-1 libssh2-1-dev
如果您手动编译它,您可能会遇到必须安装的其他依赖项。脚本configure
应该告诉你这一点。
现在,另一个解决方案可能是简单地禁用 VLC 的 SFTP 支持:
./configure --disable-sftp --prefix=/usr/ --disable-vlc --disable-lua --disable-mad --disable-swscale --disable-postproc --disable-xcb --disable-alsa
作为旁注,请记住禁用功能不是依赖问题的实际解决方案...最终,您将不得不处理它们(或使用包管理器,在这种情况下,这显然是最合适的解决方案)。