ubuntu 16 install gstreamer but gstreamer-plugins-base-1.0.pc file is not found anywhere - plugins

(Using ubuntu 16 0n my mac pro.)
To integrate gstreamer and pocketsphinx, I need three .pc files as the offical website says:
gstreamer-1.0.pc
gstreamer-base-1.0.pc
gstreamer-plugins-base-1.0.pc
I start a new empty ubuntu 18.
install the gstreamer through
$ sudo apt-get install libgstreamer1.0-dev
But only two of the three important .pc files exist after the previous command.
If I cd to /usr/ and run :
sudo find . -print | grep -i 'gstreamer-plugins-base-1.0'
the terminal returns empty( not found).
At the same time,
sudo find . -print | grep -i 'gstreamer-base-1.0'
and
sudo find . -print | grep -i 'gstreamer-1.0'
will give me correct paths.
Where is the missing gstreamer-plugins-base-1.0.pc file? Thank you.
If there are only two but not three of the .pc files, the configuration of pocketsphinx will not work.

**sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev**
helped me generate the missing gstreamer-plugins-base-1.0.pc file.
Those two are needed.

Related

Docker-compose: /usr/local/bin/docker-compose : line 1: Not: command not found

i'm trying to install Docker-compose on my Raspberry Pi 3+ which installed Raspbian buster.
I followed instruction on docker.com. After I entered command : sudo curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose.
It show a table for downloading
Result
It seems nothing downloaded, just have a file docker-compose saved in /usr/local/bin/docker-compose. When I opened it, it empty. Then I enter command docker-compose -v, it displayed error /usr/local/bin/docker-compose : line 1: Not: command not found.
Anyone have solution?
UPDATE:
Added the following command to my answer to download the LATEST version without specifying any version number at all so the download can be scripted.
curl -L "https://github.com/docker/compose/releases/download/$(curl https://github.com/docker/compose/releases | grep -m1 '<a href="/docker/compose/releases/download/' | grep -o 'v[0-9:].[0-9].[0-9]')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
It's a bit untidy, but it works. If you have a more elegant way than mine, ping it to me in the comments and I'll update my answer.
Just need to set the perms on the file:
chmod +x /usr/local/bin/docker-compose
Use the file command to validate that you pulled the correct arch for your system.
Intro:
Although docker-compose can be installed from a repo per the accepted answer, apt-cache show docker-compose reveals that as of 20211201 the repo version is only v1.25; about 2 years behind the current v2.1.1 release. In order to take advantage of more modern docker file versions, I needed to get the Github download working.
Short Answer:
The Docker documentation for Docker-Compose is WRONG. They forgot to preface the version number in the command with a "v"; consequently the download fails. Apparently this has been wrong for ages...
Longer Answer:
I ran the below command from the Docker-Compose documentation, and substituted the version "2.1.1" for "1.29.1" per Docker's guidance:
To install a different version of Compose, substitute 1.29.2 with the
version of Compose you want to use.
sudo curl -L "https://github.com/docker/compose/releases/download/2.1.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
The resulting download was 9 KB for a 23 MB binary. Clearly the link was bogus. So I went to the root of the address used in the command "https://github.com/docker/compose/releases" and right-clicked on the version of Docker-Compose that I wanted and chose "Copy Link Address"
This revealed the link Docker was telling folks to use didn't have a "v" prefaced before the version number in the https:// address part of the command.
Solution:
Preface a "v" before the version number you want in the link as below and the command executes successfully:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.1.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
BTW, I too was downloading docker-compose for a Raspberry Pi using the aarch64 binary for Ubuntu 20.04 LTS. However, the missing "v" fix for the broken download address should work for any platform.
This is because on a raspberry pi the url part of the command results in
https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-armv7l
Looking at the latest stable release at https://github.com/docker/compose/releases/tag/1.24.1 you can see there is no download for the armv7l architecture so the file is empty because there is nothing to download.
Will update answer once I figured out how to install docker-compose on Raspian.
Edit:
Via apt-get. Note: Currently (Nov. 8 2019) this installs version 1.21 which is not the latest available.
sudo apt-get install docker-compose
Via pip3. (Installs latest)
sudo apt-get install python3-pip
sudo pip3 install docker-compose
And then restart your system with
sudo shutdown -r

Install Marklogic in ubuntu 16.04?

I want to install MarkLogic 9 on my ubuntu machine. I tried following steps from this doc
sudo apt-get install alien
sudo alien --to-deb --verbose MarkLogic-9.0-3.1.x86_64.rpm
sudo dpkg -i marklogic_4.1-6_amd64.deb
sudo /etc/init.d/MarkLogic start
But when I tried the second one I got an error like this:
iama#learner:~$ sudo alien --to-deb --verbose MarkLogic-9.0-3.1.x86_64.rpmFile "MarkLogic-9.0-3.1.x86_64.rpm" not found.
I don't know how to proceed further. I just wanted to confirm, is there any official documentation to install MarkLogic 9 in ubuntu?
The error is "File Not Found"
Make sure the rpm file exists in the current directory with read privileges with the name given.
Make sure sudo is not changing to another directory.
To be certain, use an absolute file path.
Then, test with sudo ls -l file..

OPEN MPI is not working for me

I have installed MPI and GCC seperatly using yum commands,
And now when I use following command:
mpic++ first.c -o first
it says:
bash: mpic++: command not found
Can somebody please help me? I will be very thankful.
Background: I am using centos 6.5, and i am new on linux, however I have good understanding of terminal.
Mpi environment is controlled by module in CentOS so you first have to load the mpi/openmpi-x86_64 module:
module load mpi/openmpi-x86_64
In my case (Centos 7.5) the module command was not available, so I just needed to add the MPI executables to my path.
I found their location by looking at the output of this command:
rpmquery -l openmpi-devel | grep cc
And then added the following to my path:
export PATH=$PATH:/usr/lib64/openmpi/bin/
See it: https://courses.cs.washington.edu/courses/csep524/13wi/mpi/mpi_setup.txt
I also install mpi from yum, but it can't help me. I use:
download mpich
cd
wget http://www.mpich.org/static/tarballs/3.0.2/mpich-3.0.2.tar.gz
tar xzf mpich-3.0.2.tar.gz
build mpich and install in home (can also see mpich-3.0.2/README)
cd mpich-3.0.2
./configure --prefix=$HOME/mpich-install 2>&1 | tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt
put mpi binaries (e.g. mpicc, mpirun) on your PATH
add the following line to your ~/.bashrc:
export PATH=$PATH:~/mpich-install/bin
source ~/.bashrc
compile hello world:
mpicc helloworld.c -o helloworld
I get: cc: error: helloworld.c: No such file or director

Install ack-grep on CentOS

I went through fair amount of google search to install ack-grep on CentOS but I didn't find anything help. I also looked for the source codes but couldn't find it neither. Does anyone know how to install it on the OS?
Thanks a lot.
Could be essentially the same as https://stackoverflow.com/a/23155007/35946 but on CentOS 6.7 the answer is:
# yum install epel-release
# yum install ack
if you don't have the root permission, you can do as follows:
$ curl https://beyondgrep.com/ack-2.22-single-file > ~/bin/ack && chmod 0755 !#:3
or you can change to root user:
$ sudo su
# curl https://beyondgrep.com/ack-2.22-single-file > /bin/ack && chmod 0755 !#:3
You can get it from the EPEL software repository.
From the EPEL FAQ:
For EL5:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install ack'
For EL6:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
...
su -c 'yum install ack'
Go to Beyond Grep and look at the section titled
Install The ack executeable
curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 !#:3
And replace ack.2.14 with the current version of ack.
You may need to create the directory mkdir ~/bin/ first. You may
also need to modify ~/.bashrc to include this new path E.G.:
PATH=$PATH:$HOME/bin
Then reload ~/.bashrc
source ~/.bashrc
Test the installation by running ack:
rpm -qa | ack s
This should display any installed packages containing the letter s. (some linux distributions may use ack-grep as the command.
How did you try installing it? Are you using yum? The package is probably not called "ack-grep", but just "ack".
The name "ack-grep" is a Debian-specific thing because there was already a package called "ack", so they called it "ack-grep" instead. That was years ago and now they're dropping the original "ack" package and renaming "ack-grep" to "ack".
For RedHat Enterprise just do sudo yum install ack

Which yum group(s) contain a given package?

Is there a way to ask yum which group(s) contain a given package? I know how to ask what packages are in a given group, and could write a quick script to trawl over all of the groups, but it would be nice to have a simpler mechanism than that.
If you are only looking for a 'simpler mechanism' to be used by a human and don't need it in some kind of script or so, you might get by with this one:
yum groupinfo '*' | less +/sendmail-cf
Of course, replace sendmail-cf with the package name you're interested in.
You can find a group to which the specified package belongs, by using yum-list-data plugin.
$ sudo yum -y install yum-plugin-list-data
$ yum -C list-groups ftp
Loaded plugins: fastestmirror, list-data
==================== Available Packages ====================
Console internet tools 1 (100%)
list-groups done
Or, if you are not allowed to install the plugin, please save the following script and try to run it with one argument, the name of the package you try to find:
#!/bin/sh
search_name=$1
LANG=C yum grouplist -v | grep "^ " | awk -F'(' '{print $1}' | sed -e 's/^ *//' | while read line
do
if [ "${search_name}" != "" ]; then
yum groupinfo "${line}" | grep -q "^ *${search_name}$"
if [ $? -eq 0 ]; then
echo ${line}
break
fi
fi
done
I don't know about yum, but remember that it sits on top of rpm. The rpm command you're looking for is:
rpm -q --qf %{group} yourRPM
You might want to add a \n at the end, depending on that you are up to:
[root#Niflheim ~]# rpm -q --qf %{group} setarch
System Environment/Kernel[root#Niflheim ~]# rpm -q --qf "%{group}\n" setarch
System Environment/Kernel
[root#Niflheim ~]#