How to uninstall graphics.h from ubuntu? - c

I have installed graphics.h using the following steps:
First install build-essential by typing
sudo apt-get install build-essential
Install some additional packages by typing
sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 \
guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev \
libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev \
libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev \
libslang2-dev libasound2 libasound2-dev
Now extract the downloaded libgraph-1.0.2.tar.gz file.
Go to the folder where the files were extracted and run the following commands:
./configure
make
sudo make install
sudo cp /usr/local/lib/libgraph.* /usr/lib
But now how do I uninstall it again?

Related

How to verify ODBC version is the one on the odbc.ini file?

I have a requirement to configure shell to install specified version of ODBC.
The app that I'm configuring is an Angular app that uses janusgraph for storing data it is hosted on docker locally.
I updated the odbc.ini file, added the designed version. ref:https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15
I also updated the install-odbc.sh file and added the version details.
ACCEPT_EULA=Y apt-get -y install msodbcsql17=-17.8.so.1.1
# optional: for bcp and sqlcmd
ACCEPT_EULA=Y apt-get -y install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
apt-get install -y unixodbc-dev
# apt-show-versions msodbcsql17
msodbcsql17:amd64/bionic 17.8.1.1-1 uptodate
Then I deleted the app and installed it again from scratch, everything was successful and my app is backup and running on my local setup on docker.
The only challenge I have is how do I verify that indeed the ODBC version is the one on the odbc.ini file?
ODBC.ini
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.1
Description = MSSQL Server
Trace = Yes
Server = 10.0.0.0
Database = IT_D
Port = 1433
TDS_Version = 7.4
QuotedId = YES
AnsiNPW = YES
Encrypt = YES
TrustServerCertificate = YES
#VarMaxAsLong=YES
[Default]
Driver = /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.1
Docker file:
FROM ubuntu:18.04
# Create app directory
WORKDIR /root/importer
RUN apt-get -y update
# RUN apt-get -y install wget
# RUN wget https://rds-combined-ca-bundle.pem
# Wget not properly resolved by Jenkins, using local file as fallback
COPY ./rds-combined-ca-bundle.pem ./
COPY ./install-odbc.sh ./
RUN apt-get -y install gnupg2
RUN apt-get -y install dos2unix
RUN dos2unix ./install-odbc.sh
# Make sure the microsoft ODBC repository can be added as signed source
RUN apt-get -y update
RUN apt-get install -y curl apt-utils
RUN apt-get install -y apt-transport-https
# RUN apt-key adv --keyserver keyserver.ubuntu.com --keyserver-options http-proxy=${HTTP_PROXY} --recv-keys xxxxxx1229xx
RUN bash ./install-odbc.sh
# Node.js v14
RUN apt-get install -y git-core curl build-essential openssl libssl-dev python
RUN apt-get update -qq && apt-get clean
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get update -qq && apt-get clean
RUN apt-get -y install nodejs
RUN node -v
RUN npm -v
# Oracle installation
ENV ORACLE_INSTANTCLIENT_MAJOR 19.6
ENV ORACLE_INSTANTCLIENT_VERSION 19.6.0.0.0
ENV ORACLE /usr/local/oracle
ENV ORACLE_HOME $ORACLE/lib/oracle/$ORACLE_INSTANTCLIENT_MAJOR/client64
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$ORACLE_HOME/lib
ENV C_INCLUDE_PATH $C_INCLUDE_PATH:$ORACLE/include/oracle/$ORACLE_INSTANTCLIENT_MAJOR/client64
RUN apt-get update && apt-get install -y libaio1 \
curl rpm2cpio cpio \
&& mkdir $ORACLE && TMP_DIR="$(mktemp -d)" && cd "$TMP_DIR" \
&& curl -L https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient${ORACLE_INSTANTCLIENT_MAJOR}-basic-${ORACLE_INSTANTCLIENT_VERSION}-1.x86_64.rpm -o basic.rpm \
&& rpm2cpio basic.rpm | cpio -i -d -v && cp -r usr/* $ORACLE && rm -rf ./* \
&& ln -s libclntsh.so.${ORACLE_INSTANTCLIENT_MAJOR} $ORACLE/lib/oracle/$ORACLE_INSTANTCLIENT_MAJOR/client64/lib/libclntsh.so.$ORACLE_INSTANTCLIENT_MAJOR \
&& ln -s libocci.so.${ORACLE_INSTANTCLIENT_MAJOR} $ORACLE/lib/oracle/$ORACLE_INSTANTCLIENT_MAJOR/client64/lib/libocci.so.$ORACLE_INSTANTCLIENT_MAJOR \
&& echo "$ORACLE_HOME/lib" > /etc/ld.so.conf.d/oracle.conf && chmod o+r /etc/ld.so.conf.d/oracle.conf && ldconfig \
&& rm -rf /var/lib/apt/lists/* && apt-get purge -y --auto-remove curl rpm2cpio cpio
COPY ./dist/. ./
COPY ./package*.json ./
COPY ./tsconfig.json ./
# RUN npm install node-pre-gyp
RUN npm install
RUN node -v
COPY ./odbc.ini /etc/
RUN dos2unix /etc/odbc.ini
RUN cp /opt/microsoft/msodbcsql17/lib64/* /opt/microsoft/msodbcsql17/lib64/libmsodbcsql
RUN ls /opt/microsoft/msodbcsql17/lib64
COPY ./sqlnet.ora $ORACLE_HOME/network/admin/sqlnet.ora
RUN dos2unix $ORACLE_HOME/network/admin/sqlnet.ora
# CMD bash -c "npm run start:watch"
CMD bash -c "node --max-old-space-size=8192 ./app.js"
I tried to check docker logs but I couldn't file anything that indicates that the ODBC has been updated.
Can you please assist me with the steps to check the ODBC version used by my app.
Thanks in advance
Sivuyile

'Unable to open X display' error is produced by a CEF application running in windowless (off screen rendering) mode

[01] The application was built and executed in a docker.
The Dockerfile is as follows:
>>>>
FROM ubuntu:xenial
RUN apt-get update -y
RUN apt-get install -y wget
RUN apt-get install -y apt-utils
RUN apt-get install -y python3
RUN apt-get install -y tree
RUN apt-get install build-essential software-properties-common -y
RUN apt-get -y install libgtk2.0-dev
RUN apt-get -y install libgtkglext1-dev
RUN apt-get -y install python3-pip
RUN pip3 install --upgrade pip
RUN apt-get -y install cmake
RUN pip3 install --upgrade cmake
RUN apt-get -y install libnss3-dev
RUN apt-get -y install libxtst6
RUN apt-get -y install libxss1
RUN apt-get -y install libasound2
RUN apt-get -y install libatk-bridge2.0-0
<<<<
the CEF binary being used is
cef_binary_76.1.5+gd8a577c+chromium-76.0.3809.87_linux64/
[02] the application worked fine when starting the docker
with xhost+ and -e DISPLAY=.... as follows:
[A] starting docker with bash
xhost +
docker run \
-it \
--rm \
-e DISPLAY=$DISPLAY
--privileged \
-v /tmp/.X11-unix:/tmp/.X11-unix \
...
--network host \
--name $CONTAINER_NAME \
$REQD_IMAGE \
bash
[B] running the application in bash as
onpaint_streamer \
--no-sandbox \
--disable-gpu \
--disable-gpu-compositing \
--enable-begin-frame-scheduling \
--disable-extensions \
--disable-pdf-extension \
--url=file:///test/027/test.html
[03] the application DID NOT WORK when xhost+ and -e DISPLAY=....
were removed in [02][A]. The following message was dumped
+ ./onpaint_streamer --no-sandbox --disable-gpu --disable-gpu-compositing --enable-begin-frame-scheduling --disable-extensions --disable-pdf-extension --opg-fifo-path=/adhyuh/test/027/onpaint_data_fifo --opg-verbose --url=file:///test/027/test.html
d> CefInitialize : status=about_to
[0812/140301.641476:ERROR:browser_main_loop.cc(1504)] Unable to open X display.
d> CefInitialize : status=done
d> MessageLoop : status=started
[0812/140301.641921:FATAL:context.cc(584)] Check failed: CEF_CURRENTLY_ON(content::BrowserThread::UI).
./run_onpaint_data_writer_in_dk.sh: line 32: 20 Trace/breakpoint trap (core dumped) ./$STREAMER_APP --no-sandbox --disable-gpu --disable-gpu-compositing --enable-begin-frame-scheduling --disable-extensions --disable-pdf-extension --url=file:///test/027/test.html
[04] Some of the other 'flags' embedded in the code are
void SimpleApp::OnContextInitialized() {
//....
CefBrowserSettings browser_settings;
browser_settings.windowless_frame_rate = 30;
CefWindowInfo window_info;
window_info.SetAsWindowless(0);
//....
}
[05] Why should a windowless CEF application require xhost and DISPLAY to be present ? What am i missing or doing wrong ?
CEF depends on X11 library even in windowless mode ... was the answer that i got when a similar post was raised in CEF Forums. Please see https://magpcss.org/ceforum/viewtopic.php?f=6&t=16993&sid=5e46cc6bfb909badf63e0aafcfe9413f&p=42879#p42879

How to install boto3 on Ubuntu 18.04?

How do you install boto3 on Ubuntu 18.04?
I tried this:
# pip install boto3
Command 'pip' not found, but can be installed with:
apt install python-pip
# apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
#
Partial answer found at https://askubuntu.com/questions/672808/sudo-apt-get-install-python-pip-is-failing
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python3-pip
Do not run pip install --upgrade pip, otherwise the following steps are also needed:
from https://github.com/pypa/pip/issues/5240
vi /usr/bin/pip3
change the broken from pip import main import to
from pip._internal import main
and then finally
pip3 install boto3
it's quite simple, just install it from the terminal
apt install python-boto3
The log you posted informs you that the commands pip and python-pip are not already installed. So, if you still use python 2 (do not recommend), you can install pip or python-pip
sudo apt-get install pip
sudo apt-get install python-pip
and then install boto3: sudo pip install boto3.
Otherwise, if you already use Python 3, you can just install pip3 or python3-pip
sudo apt-get install pip3
sudo apt-get install python3-pip
and then install boto3: sudo pip3 install boto3

unable execute arm-cc on docker images ( ubuntu 12.04 base )

i want execute arm-cc binary on docker images (ubuntu 12.04 base)
but can't
the process was below ...
download arm CC using wget ( https://launchpad.net/linaro-toolchain-binaries/trunk/2013.10/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.xz )
uncompress the file
execute arm cc (arm-linux-gnueabi-gcc)
arm cc file is symbolic link
arm-linux-gnueabihf-gcc -> arm-linux-gnueabihf-gcc-4.8.2
and error occurred ...
gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc: Command not found
what should I do ?
Docker file contents is below
Ubuntu as base image
FROM ubuntu:12.04
MAINTAINER ...
update ubuntu image
RUN apt-get update
install essential package
RUN apt-get -y install vim
RUN apt-get -y install wget
RUN apt-get -y install bzip2
RUN apt-get -y install git
RUN apt-get -y install patch
RUN apt-get -y install make
RUN apt-get -y install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential udev
set environment variable so I know I'm in a container
ENV ARM_CROSS_COMPILER TRUE
End Dockerfile
SOLVED
my machine is 64-bit and armcc executable is 32-bit.
when i was execute it on native linux, not occurs problem.
but on docker, error occurred. i tried 64-bit compiler execution, well
running.

How to install the latest version of octave in ubuntu 14.04

sudo apt-get build-dep octave is not working. The error message is "E: Build-Depends dependency for octave cannot be satisfied because the package automake cannot be found". I have modified the /etc/apt/sources.list file with deb replaced by deb-src. Even when I try sudo apt-get install octave, an error is displayed that the package is not located.
Octave packages http://wiki.octave.org/Octave_for_Debian_systems
Many Octave packages are also distributed by your Linux distribution. These are tested to work the best with your Octave version. For example:
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics
Octave's Personal Package Archive (PPA) for Ubuntu
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
Or
sudo apt-get autoclean
You can also Try with
wget ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.bz2
tar -xvf octave-4.0.0.tar.bz2
cd octave-4.0.0
./configure
make
sudo make install
More version are available at ftp://ftp.gnu.org/gnu/octave
Or
Adding a line to your /etc/apt/sources.list
amd64: http://packages.ubuntu.com/trusty/amd64/libgraphicsmagick3/filelist
i386: http://packages.ubuntu.com/trusty/i386/libgraphicsmagick3/download

Resources