installing FreeSWITCH on Raspberry Pi VM - freeswitch

I'm using the first set of commands from here: https://freeswitch.org/confluence/display/FREESWITCH/Raspberry+Pi
using this Raspberry Pi image:
https://www.raspberrypi.org/downloads/raspberry-pi-desktop/
When I run the last command:
apt-get update && apt-get install -y freeswitch-meta-all
I get the error: unable to locate package freeswitch-meta-all
Full output:
root#raspberry:~# apt-get update && apt-get install -y freeswitch-meta-all
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://files.freeswitch.org/repo/deb/rpi/debian-release buster InRelease
Hit:3 http://ftp.debian.org/debian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Hit:5 http://ftp.debian.org/debian buster-updates InRelease
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-amd64/Packages' as repository 'http://files.freeswitch.org/repo/deb/rpi/debian-release buster InRelease' doesn't support architecture 'amd64'
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package freeswitch-meta-all

Make sure that you have the /etc/apt/sources.list.d/freeswitch.list file in place.
The echo command may fail when preceded by sudo.
Try creating the file as root by entering "sudo su" and the running the "echo" commands in the instructions.

Related

AWS CodeBuild - 'universe' distribution component is already enabled for all sources but unable to locate package yamllint

When I run this command I have the following output:
[Container] 2023/01/23 10:32:46 Running command sudo apt-get install -y yamllint
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package yamllint
After research I found that the solution for this is the command sudo apt-add-repository -y universe.
So far so good, but a problem occurs when I try to execute this via codebuild(buildspec.yml), the output in the logs is:
[Container] 2023/01/23 10:31:57 Running command sudo apt-add-repository -y universe
'universe' distribution component is already enabled for all sources.
But this is not true, because yamllint is failing afterwards!!
As part of my troubleshooting approach I managed to reproduce and fix the error on my Ubuntu Instance.
If I run sudo apt-get install -y yamllint it fails with E: Unable to locate package yamllint
But whenever I run sudo apt-add-repository -y universe, the output is:
Adding component(s) 'universe' to all repositories.
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:2 http://eu-west-3.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://eu-west-3.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
etc.
As a result sudo apt-get install -y yamllint is being installed successfully!
Any idea how to install yamllint via CodeBuild? Why it is saying 'universe' distribution component is already enabled for all sources, while the yamllint package cannot be located?
These are my all buildspec commands and all of them are successfully executed except the last one:
- sudo apt-get install software-properties-common
- sudo apt-add-repository -y universe
- sudo apt-get update -y
- sudo apt-get -y install python3-pip
- sudo apt-get install python3-yaml
- sudo apt-get install -y yamllint
I am struggling a lot with this issue, I am not a Linux guy and may be I am missing something?
Thank you.

Getting "git: command not found" in a Docker container that has git installed

I'm running the following in a Docker container (in a Gitlab CI/CD pipeline) with the python:3 image. I installed git using the following command:
apt-get update
apt-get install -y git
Based on the output, this wasn't even necessary because git was already installed. Unfortunately, I got the following output that states that the "git" command was not found even though the "git" command was used earlier in the script. Does anyone have any idea what's going on here?
$ apt-get update
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [109 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2592 B]
Fetched 8494 kB in 1s (6639 kB/s)
Reading package lists...
$ apt-get install -y git
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$ git --version
git version 2.30.2
$ git config --global user.email "${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}"
$ git config --global user.name "${GIT_USER_NAME:-$GITLAB_USER_NAME}"
$ regex="^report\/[^\/]*\/([^\/]*)\/(.*)"
$ [[ $CI_COMMIT_BRANCH =~ $regex ]]
$ CUSTOMER="${BASH_REMATCH[1]}"
$ PATH="${BASH_REMATCH[2]}"
$ RELPATH=$(.ci/scripts/find_relative.py "${CI_PROJECT_PATH}" "${PATH}")
$ git submodule add ${RELPATH} ${CUSTOMER}
/scripts-530-146123/step_script: line 151: git: command not found
ERROR: Job failed: command terminated with exit code 1
In this line:
PATH="${BASH_REMATCH[2]}"
you alter the PATH variable. I suspect it no longer has /usr/bin (or wherever git is) in the new path.

Problems with the installation of VirtualBox on Ubuntu 20.04.1 LTS

just so you know I'm pretty new at Linux.
I just made the jump from Ubuntu 19.10 to Ubuntu 20.04.1 LTS because I thought there wouldn't be a problem with VirtualBox.
When the upgrade was finished I noticed VirtualBox was gone, I tried to install it following the instruction on the official website and other sites.
I don't know what you guys exactly need to help me solve the problem so here's some informations :
Here's what appears when I do sudo apt update :
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:4 http://download.virtualbox.org/virtualbox/debian focal InRelease
Get:5 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [169 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [412 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [93,5 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [724 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [399 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [180 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [11,4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [13,4 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [110 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [16,5 kB]
Fetched 2 352 kB in 1s (2 345 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Now sudo apt install virtualbox virtualbox-ext-pack :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package virtualbox is a virtual package provided by:
virtualbox-6.1 6.1.16-140961~Ubuntu~eoan
virtualbox-6.0 6.0.24-139119~Ubuntu~eoan
You should explicitly select one to install.
Package virtualbox-ext-pack is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'virtualbox' has no installation candidate
E: Package 'virtualbox-ext-pack' has no installation candidate
Or when I do sudo apt install virtualbox-6.0 :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
virtualbox-6.0 : Depends: libqt5printsupport5 (>= 5.0.2) but it is not installable
Depends: python (< 2.8) but it is not installable
Depends: python (>= 2.7) but it is not installable
Depends: python:any (>= 2.6.6-7~)
Recommends: libsdl-ttf2.0-0 but it is not installable
Recommends: gcc but it is not going to be installed
Recommends: make but it is not going to be installed or
build-essential but it is not going to be installed or
dpkg-dev but it is not going to be installed
Recommends: binutils but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I did
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
and
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | \
sudo tee -a /etc/apt/sources.list.d/virtualbox.list
without any problems.
I hope everyone is having a good day :)
#Just Download a debian file:
https://download.virtualbox.org/virtualbox/6.1.16/virtualbox-6.1_6.1.16-140961~Ubuntu~eoan_amd64.deb
And install with :
sudo dpkg -i virtualbox-6.1_6.1.16-140961~Ubuntu~eoan_amd64.deb
#If get's Any error
sudo apt install -f
Just add a repository to your system to download the package virtualbox needs:
deb http://deb.debian.org/debian buster main contrib non-free
And then reinstall with the command:
sudo apt install virtualbox-6.1
It worked with me.
I solved it in the following way
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"
sudo apt-get update
If when doing apt-get update it appears:
N: Skipping acquire of configured file 'contrib/binary-i386/Packages'
as repository 'http://download.virtualbox.org/virtualbox/debian bionic
InRelease' doesn't support architecture 'i386'
then:
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list
continue:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libpng16-16 libqt5core5a libqt5printsupport5 libqt5widgets5 libqt5x11extras5
sudo apt-get install virtualbox-6.0 -y

How to install version specified Ruby using apt

I tried to install Ruby with version specified 2.5.1 (the version is just example), and tried following script, but I got an error as follows. Is it possible to install Ruby with a version using apt installing so I can deal with Ruby version dependency issue?
$ sudo apt update ; sudo apt install ruby-full=2.5.1
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/kelleyk/emacs/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:9 http://ppa.launchpad.net/teejee2008/timeshift/ubuntu bionic InRelease
Fetched 64.4 kB in 2s (41.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
40 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.5.1' for 'ruby-full' was not found
You can install rbenv which is a Ruby Environment and then you can install the version of Ruby you want over it.
Refer to this answer.
The specific version of ruby you want to install has to be a package available in your Ubuntu distro's package repository. A quick way to check this is using apt list | grep ruby-full or apt list | grep ruby.
If you don't find the version you're looking for, you can add a repository and download it from there. Brightbox is a widely used repository maintaining several ruby version packages. Their installation docs should help you.
Note: I still recommend that you use a ruby version manager like rbenv or rvm.

difficulty in installing ruby-bundler and update headers in ubuntu

I'm learning ruby on rails and therefore require installation of some gems for app.
I'm trying to install ruby-bundler but getting errors.
need some help..
i'll paste the commands i tried in my terminal.
thanks in advance.
hp#ubuntu:~$ bundle install --without production
The program 'bundle' is currently not installed. You can install it by typing:
sudo apt-get install ruby-bundler
hp#ubuntu:~$ sudo apt-get install ruby-bundler
[sudo] password for hp:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ruby ruby1.8
Suggested packages:
ri ruby-dev ruby1.8-examples ri1.8
The following NEW packages will be installed:
ruby ruby-bundler ruby1.8
0 upgraded, 3 newly installed, 0 to remove and 64 not upgraded.
Need to get 143 kB of archives.
After this operation, 1,139 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric/main ruby all 4.8
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric/universe ruby-bundler all 1.0.15- 0ubuntu2
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com/ubuntu/ oneiric-security/main ruby1.8 i386 1.8.7.352- 2ubuntu0.1
Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.352-2ubuntu0.1_i386.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/main/r/ruby- defaults/ruby_4.8_all.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/pool/universe/r/ruby-bundler/ruby-bundler_1.0.15-0ubuntu2_all.deb Unable to connect to ubuntuarchive.hnsdc.com:http:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
hp#ubuntu:~$ sudo apt-get update
Ign http://archive.canonical.com oneiric InRelease
Hit http://archive.canonical.com oneiric Release.gpg
Hit http://archive.canonical.com oneiric Release
Hit http://archive.canonical.com oneiric/partner i386 Packages
Ign http://archive.canonical.com oneiric/partner TranslationIndex
Err http://ubuntuarchive.hnsdc.com oneiric InRelease
Err http://ubuntuarchive.hnsdc.com oneiric-updates InRelease
Err http://ubuntuarchive.hnsdc.com oneiric-security InRelease
Err http://ubuntuarchive.hnsdc.com oneiric Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com oneiric-updates Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Err http://ubuntuarchive.hnsdc.com oneiric-security Release.gpg
Unable to connect to ubuntuarchive.hnsdc.com:http:
Ign http://archive.canonical.com oneiric/partner Translation-en_US
Ign http://archive.canonical.com oneiric/partner Translation-en
Reading package lists... Done
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-updates/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-security/InRelease
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-updates/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Failed to fetch http://ubuntuarchive.hnsdc.com/ubuntu/dists/oneiric-security/Release.gpg Unable to connect to ubuntuarchive.hnsdc.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
what could be the reasons??
is it related to ubuntu archive mirror?
i am not even able to upgrade due to broken packages.
Seems like you have a problem with network
You do not include much about what you have already done to get Ruby installed correctly so I would refer to this Blog Post on Installing Ruby on Ubuntu
One thing to note when using Ubuntu as a Development platform it is wise to install a few dev tools and libraries that are covered in this Blog post.
1/31/13 - If you have unmet Package dependencies and your installing from 3rd party sources and getting the Package dependency error. Go into your Software Sources and make sure that Restricted and Universe are unchecked.
One possible cause of unmet dependencies could be corrupted package database, and/or some packages that did not install properly.
To try and fix this problem open Terminal and run the following command
xyz#ubuntuhost$ sudo apt-get clean
apt-get clean Clears the Local repo of all files / Packages and leaves only the Lock File.
IF that does not fix your issue then try these three commands in the order below.
xyz#ubuntuhost$ sudo apt-get -f install
xyz#ubuntuhost$ sudo dpkg --configure -a
xyz#ubuntuhost$ sudo apt-get -f install
Post the output of that last command. If it found and fixed something it will report something like
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
or
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded
The -f stands for “fix broken”. Apt will attempt to correct broken dependencies. If you manually installed a package that had unmet dependencies, apt-get will install those dependencies, if possible, otherwise it may simply remove the package that you installed in order to resolve the problem.
Give this a shot.

Resources