I uninstalled json-c library on Ubuntu 16.04 LTS using # make uninstall
and removed all rest json-c with:
# find / -name "*json-c*" -exec rm -rf {} /;
after reboot, can not log into system - Log In loop
# cat ~/.xsession-error
openConnection: connect: No such file or directory
cannot connect to brltty at :0
/sbin/upstart: error while loading shared libraries: libjson-c.so.2: cannot open shared object file: No such file or directory
Tried to reinstall json-c, it gives me a library named libjson-c.so.3 but not 2.
And system is under systemd, right?
# ps -e | grep systemd
1 ? 00:00:02 systemd
UPDATE:
here is how i fixed broken package
# apt-get download libjson-c2
# dpkg -i libjson-c2ww
Your find command removed more than just what was installed from the source install.
# apt -y install libjson-c2
Related
I'm running a vagrant box which runs ubuntu inside a vm (using Laravel Homestead box)
I'm trying to install the Elastic App-search product.
The first requirement is to install Elastic search, which i have done multiple times. I did the following steps:
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update && sudo apt-get install elasticsearch
I'm using the systemd configuration:
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
I'm running curl localhost:9200 and everything is working.
Next I try to install elastic app search.
https://www.elastic.co/guide/en/app-search/current/installation.html#installation-self-managed.
Which doesn't have instructions for debian systems. But it does have a .deb install file. I downloaded the file and put it in my project route.
I ran dpkg -i on the file and it seems to have installed. When I run the command to check the file location it shows this:
dpkg -L enterprise-search
/.
/etc
/etc/init.d
/etc/init.d/enterprise-search
/var
/var/log
/var/log/enterprise-search
/usr
/usr/share
/usr/share/enterprise-search
/usr/share/enterprise-search/README.md
/usr/share/enterprise-search/bin
/usr/share/enterprise-search/bin/vendor
/usr/share/enterprise-search/bin/vendor/filebeat
/usr/share/enterprise-search/bin/vendor/filebeat/filebeat-linux-x86_64
/usr/share/enterprise-search/bin/enterprise-search
/usr/share/enterprise-search/filebeat
/usr/share/enterprise-search/filebeat/ecs-template.json
/usr/share/enterprise-search/filebeat/filebeat-ecs.yml
/usr/share/enterprise-search/lib
/usr/share/enterprise-search/lib/require_java_version.sh
/usr/share/enterprise-search/lib/enterprise-search.war
/usr/share/enterprise-search/jetty
/usr/share/enterprise-search/jetty/webserver-ssl.xml
/usr/share/enterprise-search/jetty/webserver-ssl-with-redirect.xml
/usr/share/enterprise-search/jetty/webserver.xml
/usr/share/enterprise-search/LICENSE
/usr/share/enterprise-search/config
/usr/share/enterprise-search/config/env.sh
/usr/share/enterprise-search/config/enterprise-search.yml
/usr/share/enterprise-search/NOTICE.txt
/usr/share/doc
/usr/share/doc/enterprise-search
/usr/share/doc/enterprise-search/changelog.gz
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/enterprise-search.service
I'm not really sure if this is the correct location? I want it to live in the same place as my elasticsearch install, but I'm actually not sure. I did all the next steps for the install process and ran:
./usr/share/enterprise-search/bin/elasticsearch
But this gives me the error:
Could not find java in PATH
I'm very confused by this since the main elasticsearch installation works and that also needs java? Also i want it also to run with systemd auto-enable and i want it to be available with enterprise-search start / stop. Not sure how to handle that.
Looks like it's Debian package, so it's installable on ubuntu, but some things may differ.
I would say you can:
Just switch to using debian VM for this (here you can get vagrant for one: https://app.vagrantup.com/debian/boxes/stretch64 )
Debug. From what I see that package runs elasticsearch-env before it runs itself. Java is looked for like this:
if [ ! -z "$JAVA_HOME" ]; then
JAVA="$JAVA_HOME/bin/java"
JAVA_TYPE="JAVA_HOME"
else
if [ "$(uname -s)" = "Darwin" ]; then
# macOS has a different structure
JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
else
JAVA="$ES_HOME/jdk/bin/java"
fi
JAVA_TYPE="bundled jdk"
fi
if [ ! -x "$JAVA" ]; then
echo "could not find java in $JAVA_TYPE at $JAVA" >&2
exit 1
fi
So I would advise to set JAVA_HOME in start script (or before running the binary), and see if that helps.
I solved it by adding another version of Java, Elastichsearch has a java install build-in and not separate, so the app-search install can't reach that version. Feels very dirty but got it working!
I have Ubuntu 16.04 (on Docker) and wanted to connect to remote Oracle DB using Python. For that - using cx_oracle module.
Tried:
pip install cx_oracle
--> Complained about libaio1 and libaio-dev missing..
apt-get install libaio1 libaio-dev
--> Complained again:
cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory"
Is there a one command to install cx_Oracle properly on Ubuntu 16.04 (or need to do all from source manually -> trying to automate all steps...)?
Thanks.
Did not find (yet) easy way but this is what I did:
This just worked for me on Ubuntu 16:
Download ('instantclient-basic-linux.x64-12.2.0.1.0.zip' and 'instantclient-sdk-linux.x64-12.2.0.1.0.zip') from Oracle web site and then do following script (you can do piece by piece and I did as a ROOT):
apt-get install -y python-dev build-essential libaio1
mkdir -p /opt/ora/
cd /opt/ora/
## Now put 2 ZIP files:
# ('instantclient-basic-linux.x64-12.2.0.1.0.zip' and 'instantclient-sdk-linux.x64-12.2.0.1.0.zip')
# into /opt/ora/ and unzip them -> both will be unzipped into 1 directory: /opt/ora/instantclient_12_2
rm -rf /etc/profile.d/oracle.sh
echo "export ORACLE_HOME=/opt/ora/instantclient_12_2" >> /etc/profile.d/oracle.sh
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME" >> /etc/profile.d/oracle.sh
chmod 777 /etc/profile.d/oracle.sh
source /etc/profile.d/oracle.sh
env | grep -i ora # This will check current ENVIRONMENT settings for Oracle
rm -rf /etc/ld.so.conf.d/oracle.conf
echo "/opt/ora/instantclient_12_2" >> /etc/ld.so.conf.d/oracle.conf
ldconfig
cd $ORACLE_HOME
ls -lrth libclntsh* # This will show which version of 'libclntsh' you have... --> needed for following line:
ln -s libclntsh.so.12.1 libclntsh.so
pip install cx_Oracle # Maybe not needed but I did it anyway (only pip install cx_Oracle without above steps did not work for me...)
Now python scripts are ready to use 'cx_Oracle'.
I'm trying to compile and install an open source application on Ubuntu. I can make the application, make the installer, and make the package. I don't see any error during those steps. when I issue the dpkg -i to install it if fails with the following error.
dpkg: error processing archive application.deb (--install):
corrupted filesystem tarfile - corrupted package archive
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
I can only find references to fixing the issue when downloading files and say to issue apt-get clean and purge. I've done that and it doesn't work and it doesn't seem applicable since I'm creating the install file. When I issue dpkg -c application.deb, it shows me the contents, so the file isn't total corrupted.
Any suggestions on how to get this application to install?
Following the description on https://github.com/Brewtarget/brewtarget on a newly installed Ubuntu 14.04.3 gives me a .deb that installs.
These are the commands I ran:
$ sudo apt-get install cmake git qtbase5-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5webkit5-dev libqt5sql5-sqlite libqt5svg5 libqt5multimedia5-plugins doxygen
$ git clone https://github.com/Brewtarget/brewtarget.git
$ mkdir brewtarget-build
$ cd brewtarget-build
$ cmake ../brewtarget
$ make
$ make package
$ sudo apt-get install libphonon4 libqt4-webkit phonon phonon-backend-vlc
$ sudo dpkg -i brewtarget*.deb
Selecting previously unselected package brewtarget_2.2.0.
(Reading database ... 175209 files and directories currently installed.)
Preparing to unpack brewtarget_2.2.0_x86_64.deb ...
Unpacking brewtarget_2.2.0 (2.2.0-1) ...
Setting up brewtarget_2.2.0 (2.2.0-1) ...
$ file *.deb
brewtarget_2.2.0_x86_64.deb: Debian binary package (format 2.0)
What version of Ubuntu are you running?
It is odd that your error message says "application.deb", as I got a .deb named "brewtarget_2.2.0_x86_64.deb" when following the instructions.
Try these commands
# sudo dpkg -i --force-overwrite application.deb
After that run
# sudo apt-get -f install
I tried using the following commands. However when I reach the last step to install pdftk the console is giving me the error below. I am using a hostgator VPS server. any possible suggestions would be great.
NB: I tried installing libgcj.so.7rh()(64bit) but it already exists. maybe I am doing something wrong.
**Error:** Package: pdftk-1.44-2.el5.rf.x86_64 (rpmforge)
Requires: libgcj.so.7rh()(64bit)
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0', '8.14.4', '8.el6')
These are the steps that I followed.
# Log in as root
cd /usr/local/src
# Type
uname -i
#To see which package you need
#Pick one of the below vdepending on the output of uname -i
i386<br>
wegt packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
x86_64 <br>
wget packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
#Then type
rpm --import apt.sw.be/RPM-GPG-KEY.dag.txt
Verify the downloaded package
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
#Install RPM
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
#Then
yum install pdftk
Note: I had to remove the http:// from the links in the commands above before posting.
It seems like you might have a 32-bit OS installed? If you ran through each of those commands in order, you would be trying to use the 64-bit rpmforge repository, which is incorrect for a 32-bit OS.
If that is an accurate supposition, do this..
cd /etc/yum.repos.d/
ls -al
rm <each-rpmforge-file>
Then...
cd /usr/local/src
yum clean
wget packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
yum update
yum install pdftk
I have no experience to linux system, and i would like to help me to solve this issue..
Now i have the following job..
cd ~
cd home
cd myusernmae
mkdir src
wget http://downloads.xiph.org/releases/icecast/icecast-2.3.2.tar.gz
tar -zxvf icecast-2.3.2.tar.gz
cd icecast-2.3.2
./configure
Error so i type the followings
apt-get install libxslt1-dev
sudo apt-get install libogg-dev libvorbis-dev
./configure
make
make install
cp -R /home/username/icecast-2.3.2/web ~/icecast/
Now when i type icecast shell response with the following message
Icecast 2.3.2
usage: icecast [-b -v] -c <file>
options:
-c <file> Specify configuration file
-v Display version info
-b Run icecast in the background
I know how can i use icecast into windows (icecast configuration file) but i don't know where to find it and how modify it into linux (vi editor :( )
Any help would me usefull
If this is an Ubuntu or a Debian based system, a simple sudo apt-get install icecast2 should install the server for you without polluting your system. The configuration file is usually in /etc/. If it is Debian or Ubuntu, doing a dpkg -L icecast2 | grep etc after installing should show you the config files. Fire up an editor, edit them and then restart the service.