Переключаетесь на пользователя root, переходите в каталог с libavcodec.so.51, выполняете команду. Итого:
[console]
$ su -
# cd /usr/lib
# ln -s libavcodec.so.51 libavcodec.so.52
[/console]
ps. Пользователь root тут при том, что наверняка речь о системном каталоге /usr/lib/, в который разрешено писать только суперпользователю.
Установка motion
Спасибо, но пока не помагает. Сделал:
[console]
linux-oino:/usr/lib # ln -s libavcodec.so.52.122.0 libavcodec.so.51
[/console]
Все равно при установке проблема осталась:
[console]
linux-oino:/home/fox7812 # rpm -ivh motion-3.2.7-2.fc7.rf.i386.rpm
предупреждение: motion-3.2.7-2.fc7.rf.i386.rpm: Заголовок V3 DSA/SHA1 Signature, key ID 1aa78495: NOKEY
ошибка: Неудовлетворенные зависимости:
libavcodec.so.51 нужен для motion-3.2.7-2.fc7.rf.i386
libavformat.so.51 нужен для motion-3.2.7-2.fc7.rf.i386
libavutil.so.49 нужен для motion-3.2.7-2.fc7.rf.i386
libmysqlclient.so.15 нужен для motion-3.2.7-2.fc7.rf.i386
libmysqlclient.so.15(libmysqlclient_15) нужен для motion-3.2.7-2.fc7.rf.i386
[/console]
Вроде все делаю правильно...
fox7812, покажите вывод команды:
[console]ls -l /usr/lib | egrep libavcodec
[/console]
[console]# rpm -ivh motion-3.2.7-2.fc7.rf.i386.rpm[/console]
Вроде все делаю правильно...
вещи несовместимые, в чём сами только что и убедились. Можно, конечно, попробовать добавить --nodeps...
Но! Правильный путь:
[console]$ rpm2txz ...
# upgradepkg --install-new ...
[/console]
ps. Почитайте на досуге о том, как устроен rpm, механизм определения им установленных/отсутствующих пакетов (локальная база, обновляемая при каждой установке/удалении пакета), добавьте сюда то, что вся Slackware ставилась без участия rpm -- и всё сразу встанет на свои места.
fox7812, покажите вывод команды:
[console]ls -l /usr/lib | egrep libavcodec
[/console]
Вывод команды:
[console]
linux-oino:/home/fox7812 # ls -l /usr/lib | egrep libavcodec
lrwxrwxrwx 1 root root 22 Сен 11 19:28 libavcodec.so.51 -> libavcodec.so.52.122.0
-rwxr-xr-x 1 root root 6456152 Сен 8 23:20 libavcodec.so.52.122.0
lrwxrwxrwx 1 root root 21 Авг 30 00:40 libavcodec.so.53 -> libavcodec.so.53.12.0
-rwxr-xr-x 1 root root 6267600 Авг 24 00:58 libavcodec.so.53.12.0
[/console]
bormant, спасибо, посмотрю.
fox7812, симлинк удачно создан, так что проблема хз в чем,но у Вас есть несколько путей решения этого вопроса(с моей точки зрения):
1) попробовать удалить симлинк на libavcodec.so.52.122.0 и создать на libavcodec.so.53.12.0 - только я думаю эот не сильно изменит ситуацию.
2) то что предложил bormant
3) установить motion с slackbuilds.org,предварительно проверив зависимости.
Попробывал по другому, скачал архивом, настроил вроде все службы, запустил конфиг:
[console]
linux-oino:/home/fox7812 # cd motion-3.2.12
linux-oino:/home/fox7812/motion-3.2.12 # ./configure
checking for Darwin... no
checking for *BSD... no
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 threads... yes
checking for libjpeg-mmx... skipping
checking for libjpeg...
checking for jpeg_set_defaults in -ljpeg... yes
checking for ffmpeg autodetecting... found in /usr/lib
checking for ffmpeg headers in /usr... found /usr/include/libavformat/avformat.h
checking file_protocol is defined in ffmpeg ?... no
checking for mysql support... testing
checking autodect mysql headers... yes
checking autodect mysql libs... /usr/lib
checking for mysql_init in -lmysqlclient... yes
checking for PostgreSQL... testing
checking autodect pgsql headers... yes /usr/include/pgsql
checking autodect pgsql libs... /usr/lib
checking for PQconnectStart in -lpq... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking linux/videodev.h usability... yes
checking linux/videodev.h presence... yes
checking for linux/videodev.h... yes
checking linux/videodev2.h usability... yes
checking linux/videodev2.h presence... yes
checking for linux/videodev2.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking for get_current_dir_name... yes
checking for struct v4l2_buffer... yes
checking for V42L support... yes
checking size of short... 2
checking size of int... 4
checking size of long int... 4
checking size of long long... 8
checking size of int *... 4
checking size of void *... 4
checking for an ANSI C-conforming const... yes
Detected CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
CPU optimization: -march=i686
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating thread1.conf
config.status: creating thread2.conf
config.status: creating thread3.conf
config.status: creating thread4.conf
config.status: creating motion-dist.conf
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-Fedora
config.status: creating motion.spec
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
*******************************
Configure status
motion 3.2.12
*******************************
OS : Linux
pthread Support: Yes
jpeg Support: Yes
V4L included: Yes
V4L2 supported: Yes
FFmpeg Support: Yes
MYSQL Support: Yes
PostgreSQL Support: Yes
CFLAGS: -g -O2 -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -I/usr/include/pgsql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP -march=i686
LIBS: -lm -lpthread -ljpeg -L/usr/lib -lavformat -lavcodec -lavutil -lm -lz -L/usr/lib -lmysqlclient -lz -L/usr/lib -lpq
LDFLAGS: -L/usr/lib
Install prefix: /usr/local
[/console]
Запустил make:
[console]
linux-oino:/home/fox7812/motion-3.2.12 # make
Welcome to the setup procedure for Motion, the motion detection daemon! If you get
error messages during this procedure, please report them to the mailing list. The
Motion Guide contains all information you should need to get Motion up and running.
Run "make updateguide" to download the latest version of the Motion Guide.
Version: 3.2.12
Platform: Linux (if this is incorrect, please read README.FreeBSD)
Compiling Motion object files...
--------------------------------------------------------------------------------
gcc -g -O2 -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -I/usr/include/pgsql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP -march=i686 -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/usr/local/etc\" -c -o ffmpeg.o ffmpeg.c
ffmpeg.c:26:10: warning: #warning **************************************************
ffmpeg.c:27:10: warning: #warning Your version of FFmpeg is newer than version 0.4.8
ffmpeg.c:28:10: warning: #warning Newer versions of ffmpeg do not support MPEG1 with
ffmpeg.c:29:10: warning: #warning non-standard framerate. MPEG1 will be disabled for
ffmpeg.c:30:10: warning: #warning normal video output. You can still use mpeg4 and
ffmpeg.c:31:10: warning: #warning and mpeg4ms which are both better in terms of size
ffmpeg.c:32:10: warning: #warning and quality. MPEG1 is always used for timelapse.
ffmpeg.c:33:10: warning: #warning Please read the Motion Guide for more information.
ffmpeg.c:34:10: warning: #warning Note that this is not an error message!
ffmpeg.c:35:10: warning: #warning **************************************************
ffmpeg.c:183:5: warning: initialization from incompatible pointer type
ffmpeg.c: In function ‘mpeg1_write_trailer’:
ffmpeg.c:202:5: warning: ‘put_buffer’ is deprecated (declared at /usr/include/libavformat/avio.h:256)
ffmpeg.c:203:5: warning: ‘put_flush_packet’ is deprecated (declared at /usr/include/libavformat/avio.h:293)
ffmpeg.c: In function ‘ffmpeg_init’:
ffmpeg.c:232:5: warning: implicit declaration of function ‘av_register_protocol’
ffmpeg.c: In function ‘get_oformat’:
ffmpeg.c:261:9: warning: implicit declaration of function ‘guess_format’
ffmpeg.c:261:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:273:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:276:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:283:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:286:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:290:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c:298:12: warning: assignment makes pointer from integer without a cast
ffmpeg.c: In function ‘ffmpeg_open’:
ffmpeg.c:380:21: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
ffmpeg.c:380:21: note: each undeclared identifier is reported only once for each function it appears in
ffmpeg.c:420:5: warning: ‘av_set_parameters’ is deprecated (declared at /usr/include/libavformat/avformat.h:1407)
ffmpeg.c:501:9: warning: ‘url_fopen’ is deprecated (declared at /usr/include/libavformat/avio.h:279)
ffmpeg.c:511:17: warning: ‘url_fopen’ is deprecated (declared at /usr/include/libavformat/avio.h:279)
ffmpeg.c:532:5: warning: ‘av_write_header’ is deprecated (declared at /usr/include/libavformat/avformat.h:1465)
ffmpeg.c: In function ‘ffmpeg_close’:
ffmpeg.c:599:9: warning: ‘url_fclose’ is deprecated (declared at /usr/include/libavformat/avio.h:280)
ffmpeg.c: In function ‘ffmpeg_put_frame’:
ffmpeg.c:649:22: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
make: *** [ffmpeg.o] Ошибка 1
[/console]
Получается проблема только в ffmpeg? (Ставлю на OpenSuse если это важно);
Ставлю на OpenSuse
Предлагаю Вам задать свой вопрос заново в соответствующем разделе форума.
Решения для Slackware тривиальны, как один из вариантов:
[console]# sbopkg -i "lame x264 ffmpeg motion"[/console]
но для OpenSUSE они не подойдут без осмысления сути происходящего.
ps. Это не то, что Вы ищете?
http://rpm.pbone.net/index.php3/stat/4/idpl/8408617/dir/opensuse/com/motion-3.2.8-5.1.i586.rpm.html
Спасибо, вроде встала наконец:) Буду разбираться дальше.