Posts Tagged ‘ Debian

Vagrant: libvirt library not found in default locations (RuntimeError)

vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
 
An error occurred while installing ruby-libvirt (0.5.2), and Bundler cannot continue.
Make sure that `gem install ruby-libvirt -v '0.5.2'` succeeds before bundling.
 
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
 
    /opt/vagrant/embedded/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
 
Provided configuration options:
	--with-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/opt/vagrant/embedded/bin/ruby
	--with-libvirt-include
	--without-libvirt-include
	--with-libvirt-lib
	--without-libvirt-lib
	--with-libvirt-config
	--without-libvirt-config
	--with-pkg-config
	--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)
 
 
Gem files will remain installed in /home/reverse/.vagrant.d/gems/gems/ruby-libvirt-0.5.2 for inspection.
Results logged to /home/reverse/.vagrant.d/gems/gems/ruby-libvirt-0.5.2/ext/libvirt/gem_make.out

Fix this problem with Vagrant

apt-get install libvirt-dev

perl: warning: Please check that your locale settings in Debian

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "uk_UA.UTF-8",
	LC_MONETARY = "uk_UA.UTF-8",
	LC_ADDRESS = "uk_UA.UTF-8",
	LC_TELEPHONE = "uk_UA.UTF-8",
	LC_NAME = "uk_UA.UTF-8",
	LC_MEASUREMENT = "uk_UA.UTF-8",
	LC_IDENTIFICATION = "uk_UA.UTF-8",
	LC_NUMERIC = "uk_UA.UTF-8",
	LC_PAPER = "uk_UA.UTF-8",
	LANG = "uk_UA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: delaying package configuration, since apt-utils is not installed

Read more

DHCPD-Pools : Unable to find uthash.h

При зборці Dhcpd-pools видає помилку

Unable to find uthash.h

Вирішення:

apt-get install uthash-dev

snmpd: error on subcontainer ‘ia_addr’ insert (-1)

Если даная ошибка сыпется в лог с завидным постоянством, то в системе есть конфликт IP-адресов.
Нужно убедится, что у вас нет конфликтов, особенно присмотреться к IPv6 адресам
Как вариант – отключить IPv6
Либо можно понизить логирование самого snmpd демона
В файле /etc/default/snmpd немного поправив строку
Read more

Управляем KVM через браузер с помощью WebVirtMgr

При работе с системами виртуализации всегда хочеться получить доступ к хост-машине с любой точки мира и с любого устройства которое есть под рукой. Если пользоваться штатными инструментами KVM, XenServer, VMWare то там необходима установленая консоль управления на локальном ПК и если нужно сделать, что то удаленно и быстро то возникают проблемы… начинаеш ставить консоль, не хватает .Net… поставил его, не хватает чего то другого. В результате, иногда, чтоб перегрузить умершую виртуалку требуется 30-60мин пока все скачаеш и поставишь. Хотя все это можно проделать с консоли за 30сек 🙂
Но мы не об этом.

Тут будет актуально имет скорый доступ к управлению через браузер, что даст возможность подключится даже с телефона.
Приступим к настройке.
Исходные данные: Debian 7.7
Настраиваем все с нуля.
Read more

Просмотр S.M.A.R.T у hdd подключенных к LSI Megaraid

Есть HDD подключенные к SAS RAID контроллеру Dell Perc 5/i он же LSI MegaLogic 1068
Для просмотра подробного статуса состояния HDD можно восмользоваться пакетом smart
Устанавливаем:

apt-get install smartmontools

Но так как они спрятаны за контроллером, то нужны драйвера ядра megaraid

lsmod | grep megaraid
megaraid_sas           68571  4 
scsi_mod              162321  6 megaraid_sas,libata,ses,sd_mod,sr_mod,sg

Read more

Установка MegaCli в Debian 7

Долго пришлось искать утилиту мониторинга MegaRAID SAS рэйд контроллера от LSI, который установлен в сервере Dell и опознаётся как Dell Perc 5
В архиве файл megacli_8.07.14-1_amd64.deb
MegaCli_Linux Debian
megacli_i386
Read more

Ошибка “sh: 1: source: not found” при выполнении через PHP

Выполняя php-скриптом команду

exec("source vars");

вылетала ошибка

sh: 1: source: not found

Хотя сама команда source является встроеной в bash и напрямую с консоли все выполняется. Варианты с sudo, su и прочими танцами с бубном не помагали.
Как оказалось проблема в том, что в Debian 7 по умолчанию как интерпретатор sh используется dash

Debian and derived Linux distributions such as Ubuntu ship a version of ash, known as dash (Debian Almquist shell), as the default /bin/sh, although Bash is the default login shell for interactive use.

Read more

Screenshot сайта с консоли Linux

Появилась задачка отслеживать как меняется дизайн сайта на протяжении недели с шагом в 3часа.
Можно конечно запускать wget по расписанию, но не сильно удобно смотреть потом 100500 файлов.
После поиска по просторам инета был найден простенький способ.
Для этого нам понадобится какой-то сервер (рабочая машина) на Linux.

Для захвата изображения будем использовать програмку CutyCapt

CutyCapt is a small cross-platform command-line utility to capture WebKit’s rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP

В итоге мы получим картинку с сайтом отрендереном движком WebKit. Однако требуется Xserver для рендера.
Read more

Установка Asterisk 12 в Debian 7

Вырезка из bash history по установке Asterisk 12 в дебине. Тут ничего нового или загадочного, просто все пакеты и команды в одном месте.
Read more

ошибка modules.link при сборке Asterisk из исходных кодов

Сия ошибка вылазит при сборке Asterisk 12 в Debian

make[1]: *** No rule to make target `../main/modules.link', needed by `asterisk'.  Stop

Самый простой способ избавится от этой ошибки – отключить embed из конфигурации
embed