LinuxForum.Fans
Тема

Как устанавливать (компилировать) исходники программ?

Автор: u_____16 25 сообщений 6567 просмотров
#203235

Собственно САБЖ в Дебиан впервые сталкиваюсь. :(

#203236

Вы хотите скомпилировать конкретные исходники или вопрос общего смысла?

#203237

обычно с исходниками идут файлы README, INSTALL. не все сразу конечно, хотя могут быть и все. и вот в них обычно пишут как компилировать и устнавливать данную программу.

это может быть примерно следующий набор команд:
$ ./configure && make
# make install

но программы лучше ставить из репозиториев дистрибутива, если эти программы присутствуют в репозиториях.

Для некоторых программ в исходниках могут быть специальные установочные сценарии.
Так что посмотрите исходные файлы, там скорее всего будет описание процесса установки.

#203239
utking написал:
обычно с исходниками идут файлы README, INSTALL. не все сразу конечно, хотя могут быть и все. и вот в них обычно пишут как компилировать и устнавливать данную программу.

это может быть примерно следующий набор команд:
$ ./configure && make
# make install

но программы лучше ставить из репозиториев дистрибутива, если эти программы присутствуют в репозиториях.

Для некоторых программ в исходниках могут быть специальные установочные сценарии.
Так что посмотрите исходные файлы, там скорее всего будет описание процесса установки.

У меня интернет слабый))) есть в tar kylix , хотелось бы поставить ))
Да и много каких программ у меня есть, а они все в архивах...В Install непонятно всё написано, + иногда просит непонятные библиотеки)

#203242

непонятные библиотеки? вот как раз при установке "руками" библиотеки приходится ставить получив сообщение об ощибке что их нет при сборке программы.
именно поэтому и лучше ставить из реп :) но конечно kylix'a там нет :). кроме того, полагаю, что ему потребуются старые версии библиотек, которых уже не будет в твоей версии дистрибутива

пробуй ставить. требующиеся либы придется самому отслеживать в ходе сборки и ставить

#203243
utking написал:
требующиеся либы придется самому отслеживать в ходе сборки и ставить

Причём объём требуемых пакетов для сборки программы может быть гораздо больше чем при установке той же программы из репозитория вместе с зависимостями (от них, зависимостей, всё равно никуда не деться)
И стоит помнить что собранные методом
[console]./configure && make && make install[/console]
программы превращают систему в помойку.
Если всё же нужно поставить из исходников попробуйте checkinstall.
http://debian.pro/628

#203250

То есть установка будет выглядеть так?
[console]/home/matrix/Рабочий стол/kylex.tar ./configure && make && make install[/console]

#203254

Сначала нужно распаковать архив, потом перейти в каталог с исходниками (тот в который Вы архив распаковывали), а затем уже
[console]./configure && make
su (вводите пароль и жмёте Enter)
make install[/console]
Для большинства программ именно так, как конкретно для kylix читайте в файле INSTALL в архиве.
Возможно там (в архиве) есть файл install.sh, тогда надо выполнить
[console]sh ./install.sh [/console]
находясь в директории с этим файлом.

P.S. Кстати, вот что о kylix написано в википедии

В 2002 году компания-разработчик Borland прекратила поддержку продукта из-за убытков, которые он приносил.
Гарантированно Kylix 3 работает только на ядрах серии 2.2 и 2.4. Патчи для позднейших версий ядра в большинстве случаев не решают проблемы.
#203257

[console]matrix@debian:~$ cd '/home/matrix/Рабочий стол/hydra-5.8-src'
matrix@debian:~/Рабочий стол/hydra-5.8-src$ ./configure && make

Starting hydra auto configuration ...

Checking for openssl (libssl/ssl.h) ...
... NOT found, SSL support disabled
Get it from http://www.openssl.org
Checking for Postgres (libpq.so) ...
... NOT found, module postgres disabled
Checking for SVN (libsvn_client-1 libapr-0.so libaprutil-0.so) ...
... NOT found, module svn disabled
Checking for firebird (libfbclient.so) ...
... NOT found, module firebird disabled
Checking for AFP (libafpclient.so) ...
... NOT found, module Apple Filing Protocol disabled
Checking for NCP (libncp.so / nwcalls.h) ...
... NOT found, module NCP disabled
Checking for SAP/R3 (librfc/saprfc.h) ...
... NOT found, module sapr3 disabled
Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp
Checking for libssh (libssh/libssh.h) ...
... NOT found, module ssh2 disabled
Get it from http://www.libssh.org
Checking for GUI req's (pkg-config) ...
... found

Hydra will be installed into .../bin of: /usr/local
(change this by running ./configure --prefix=path)

Writing Makefile.in ...
now type "make"
bash: make: команда не найдена[/console]
Вот как ставил Hydro...Не получилось.

#203259

вот тут точно надо
sudo aptitude install hydra

оно же есть в репах!!! кстати и версия поновее ;)

#203275

[console]matrix@debian:~$ sudo aptitude install hydra
[sudo] password for matrix:
matrix is not in the sudoers file. This incident will be reported.
matrix@debian:~$

[/console]
Фигня какая то)

#203276
Босх написал:
[console]matrix@debian:~$ sudo aptitude install hydra
[sudo] password for matrix:
matrix is not in the sudoers file. This incident will be reported.
matrix@debian:~$

[/console]
Фигня какая то)

sudo в debian'e сначала надо настраивать.
Проще всё гораздо
[console]su
вводите пароль рута
aptitude install hydra[/console]

#203277

[console]su
aptitude install hydra[/console]
А ругается потому что пользователь не в группе sudo/

#203278

durc
[console]matrix@debian:~$ su
Пароль:
root@debian:/home/matrix# aptitude install hydra
E: Не удалось получить доступ к файлу блокировки /var/lib/dpkg/lock - open (11: Ресурс временно недоступен)
E: Не удалось выполнить блокировку управляющего каталога (/var/lib/dpkg/); он уже используется другим процессом?
W: Не удалось заблокировать кэш файл; обычно это означает, что dpkg или какая-от утилита apt уже выполняет установку пакета. Выполняется открытие в режиме только для чтения; любые изменения состояний пакетов сохранены НЕ БУД
E: Не удалось получить доступ к файлу блокировки /var/lib/dpkg/lock - open (11: Ресурс временно недоступен)
E: Не удалось выполнить блокировку управляющего каталога (/var/lib/dpkg/); он уже используется другим процессом?
root@debian:/home/matrix# [/console]

#203280

У Вас может быть synaptic запущен или какой нибудь апплет обновлений?
Сначала прервите работу программ, которые имеют отношение к управлению пакетами.

#203340
durc написал:
У Вас может быть synaptic запущен или какой нибудь апплет обновлений?
Сначала прервите работу программ, которые имеют отношение к управлению пакетами.

Ничего такого не запущено.

#203341

Давайте вернемся к исходникам))
Гидру не могу собрать...

#203343
Показать
[console]root@debian:/home/matrix# cd'/home/matrix/Рабочий стол/hydra-7.1-src'
bash: cd/home/matrix/Рабочий стол/hydra-7.1-src: Нет такого файла или каталога
root@debian:/home/matrix# cd '/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk'
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# make
bash: make: команда не найдена
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# install
install: пропущен операнд, задающий файл
Попробуйте `install --help' для получения более подробного описания.
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# configure
bash: configure: команда не найдена
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# /configure
bash: /configure: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# "/configure
> "/configure
bash: /configure
/configure: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... no
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gtk+-2.0 >= 2.0.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found
configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./make
bash: ./make: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./dpl4hydra
bash: ./dpl4hydra: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./make
bash: ./make: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# cleat
bash: cleat: команда не найдена
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# clear

root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./make
bash: ./make: Нет такого файла или каталога
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... no
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gtk+-2.0 >= 2.0.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found
configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# clear

root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... no
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gtk+-2.0 >= 2.0.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found
configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# clear

root@debian:/home/matrix/Рабочий стол/hydra-7.1-src/hydra-gtk# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... no
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for strerror in -lcposix... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gtk+-2.0 >= 2.0.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found
configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
[/console]

Что делать после ./configure ?

Make не работает

#203347

Во первых, огромная просьба для таких "портянок" пользоваться тегом "спойлер"
Во вторых, configure закончилось с ошибкой

configure: error: Library requirements (gtk+-2.0 >= 2.0.0) not met

Видимо надо установить пакет libgtk2.0-dev

Войдите или зарегистрируйтесь, чтобы ответить.