How to install FFMPEG into GCP - google-cloud-platform

How to install FFMPEG in Google Cloud Shell. is that possible?
screenshot of error
sorry for my bad language

You can install FFmpeg on Cloud Shell using the following commands. However, your Cloud Shell machine is ephemeral and no system-wide change will persist beyond session end.
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
Customize Cloud Shell

Related

How to install extra linux package in GCP Composer?

I have written a dag which uses mongoexport command in BashOperator. By default mongoexport package is not installed in composer. I will need to install it using below command:
sudo apt install mongo-tools
We can directly install PyPi packages in composer as there is direct option available in gcp console for that.
But how can i install apt package in all nodes of composer? also that package should be effective in case of autoscaling.

How do I permanently install an apt package in Google Cloud Shell?

I tried to install a package with apt-get cloud shell once but the next day it was gone. I saw another stackoverflow here. But it was out of date (I think). Please help.
As you can see from the link #DazWilkin has provided, the only directory where Cloud Shell persists your file is at $HOME directory. Anything installed with apt will not persist when the instance provisioned in Cloud Shell shuts down.
There's a solution for this problem. The script $HOME/.customize_environment runs everytime you boot up Cloud Shell. It is already running as root and there you can run apt to install the packages you want.
Example, as per doc:
#!/bin/sh
apt-get update
apt-get -y install erlang
Update: There seems to be an issue where .customize_environment is not working. It's been confirmed by a Google Engineer and it's currently being fixed.

AWS CLI VERSION UPGRADE

I have installed AWS CLI latest version using "sudo pip install --upgrade awscli " .
this has successfully updated my aws cli version but for only root users, but for all remaining users , it is showing version as previous one only, If I run the command without sudo then its saying permission denied.
If my server has multiple linux users and want to update my aws cli version from 1.16.3 to 1.18.223 for all users, how can I do it ?
Please help me .
Thank in advance
You can adjust the path where you want to install, the binary.
Install the AWS CLI version 1 using the bundled installer with sudo
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.18.223.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Just curious when you are upgrading the AWS Cli why not the latest which is backward compatible and probaly more options
Try not to install pip packages with sudo. Better use a Creating virtual environments

How to add user made scripts to EC2 ubuntu?

I have created an EC2 instance on AWS and I want to transfer some scripts into the site-packages of python3. I can't seem to find a way to do this. Some functions from these files are used by the scripts I am looking to run.
I tried SFTP but it wont allow me to get into the folder just tried to download it.
I am on Ubuntu.
Thanks
Best option to install any service or program in python on a linux server is to create a regular user and then create a virtualenv on a private directory. There, you can freely install any script or package and give the proper rights to specific services/directories of your server.
Install also basic packages in order to run python environment:
sudo apt-get install -y build-essential python-dev python-setuptools zlib1g-dev python-pip

How to Enable PHP 7.0 Zip module on Amazon Linux AMI

Using the command line, I have installed PHP 7.0 on the Amazon Linux AMI.
However, I am unable to install the PHP Zip Module using the command
sudo yum install php7.0-zip
I get the response
No package php7.0.zip available.
I am excited to start using PHP7 on all my PHP websites, but am a little confused why I am unable to install this particular module. Any help would be much appreciated!
Welp,
After trying several variations of the same command...
sudo yum install php7.0-zip
sudo yum install php7-zip
THIS ONE WORKS
sudo yum install php70-zip