difficulty in installing ruby-bundler and update headers in ubuntu - ruby

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.

Related

installing FreeSWITCH on Raspberry Pi VM

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.

Unable to fetch some archives, maybe run apt-get update using Mobaxterm

I downloaded Mobaxterm to use the a Bash shell. The problem is, I can't compile my C files with "cc -o file file.c". It shows me this :
Command 'cc' not found, but can be installed with:
sudo apt install gcc
sudo apt install clang
sudo apt install pentium-builder
sudo apt install tcc
But whenever I type these commands it returns me error messages such as :
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev
amd64 4.15.0-29.31
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev
amd64 4.15.0-29.31
404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-29.31_amd64.deb 404 Not Found [IP: 91.189.
88.162 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
mainuser#DESKTOP-AN5KMJ2:/mnt/c/Users/LEPCDC~1/Desktop$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
Go to Plugin section of the website and download plugin
Gcc, G++ and development tools: the GNU C/C++ compiler and other development tools.
It'll download a file named Development.mxt3
Now go to C:\Program Files (x86)\Mobatek\MobaXterm\ folder and paste the downloaded file here.
Copying the plugin file here
Open the application's terminal and by now you'll be able to compile
cc -o file file.c
and run as follows
./file.exe
compile & run

PHP5-GD - package missing

I am not sure i I need to ask this here.
I trying to install php5-gd with this command
sudo apt-get install php5-gd
But, system says that there is no this package
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed: php5-gd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 28,3 kB of archives.
After this operation, 163 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated!
php5-gd Install these packages without verification? [y/N] Y
Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-gd amd64 5.6.23+dfsg-1+deprecated+dontuse+deb.sury.org~trusty+1 404 Not Found [IP: 91.189.95.83 80] E: Failed to fetch
http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/pool/main/p/php5/php5-gd_5.6.23+dfsg-1+deprecated+dontuse+deb.sury.org~trusty+1_amd64.deb 404 Not Found [IP: 91.189.95.83 80]111
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
I tried also --fix-mising but still no progress.
The repository is outdated, follow this guide on how to update it: https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php#compatibility-php5--packages

"InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)" when updating package list

Here is what I see in my terminal:
user#user-OptiPlex-9020:~$ sudo apt-get update
Ign http://extras.ubuntu.com trusty InRelease
Ign http://in.archive.ubuntu.com trusty InRelease
Get:1 http://dl.google.com stable InRelease
100% [1 InRelease gpgv 1,661 B] [Connecting to 192.168.0.90 (192.168.0.90)] [WaSplitting up /var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_InRelease intoIgn http://dl.google.com stable InRelease
E: GPG error: http://dl.google.com stable InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
I have the required authentication information in /etc/apt/apt.conf file:
Acquire::http::proxy "http://username:password#192.168.0.90:8080/";
Acquire::https::proxy "https://username:password#192.168.0.90:8080/";
Acquire::ftp::proxy "ftp://username:password#192.168.20.0:8080/";
I am not able to figure out the problem.
One way for that is to remove dl.google.com from your software update repositories,
for that, use System Settings -> Software & Update -> Other Software
and uncheck dl.google.com
then run
sudo apt-get update
I could not find a way to keep google in circle because I live in Iran & google refuses service to users in Iran.
Just follow below 3 easy steps, and it works for me:
Step 1: Edit google-chrome.list repo file:
$ sudo nano /etc/apt/sources.list.d/google-chrome.list
Step 2: Comment the "dl.google.com..." line and save the file:
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
Step 3: Run update again:
$ sudo apt-get update
You can try remove some repositorie, be careful with that repositories to you deletes
sudo rm /etc/apt/sources.lists.d/***.list
and later
sudo apt-get update -y
Sometimes problem is with your ISP service providers. Your IP might be in blacklist. Please check on https://mxtoolbox.com/blacklists.aspx and type in your IP to see the results. If you see your IP as listed, you can click on details and request for delisting your IP
I had the same problem and without a proper knowledge, I re-installed the OS and had the same issue. I fixed this issue by delisting from blacklist.

Unable to Install Heroku toolbelt on Samsung ARM Chromebook?

I have a Samsung Series 3 Chromebook with the ARM processor. I made a Crouton chroot and installed Ubuntu cli. I have Node.js 0.10.15 installed and running. I tried to install the heroku-toolbelt and it won't run. Below is the command:
(precise)root#localhost:/# wget --no-check-certificate -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
I used --no-check-certificate because when I took quiet mode off I learned that was causing the install to punt. After it told me a few times it could not verify certificates, it did said:
gpg: no valid OpenPGP data found.
Get:1 http://toolbelt.heroku.com ./ Release.gpg [490 B]
Hit http://ports.ubuntu.com precise Release.gpg
Hit http://ports.ubuntu.com precise-updates Release.gpg
Hit http://ports.ubuntu.com precise-security Release.gpg
Hit http://ports.ubuntu.com precise Release
Hit http://ports.ubuntu.com precise-updates Release
Get:2 http://toolbelt.heroku.com ./ Release [1,673 B]
Ign http://toolbelt.heroku.com ./ Release
and a whole lot more Hit http://......
After which it said:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ca-certificates foreman git git-core git-man heroku libasn1-8-heimdal libcurl3-gnutls liberror-perl libgcrypt11 libgnutls26 libgpg-error0
libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2 libp11-kit0
libroken18-heimdal librtmp0 libruby1.9.1 libsasl2-2 libsasl2-modules libtasn1-3 libwind0-heimdal libyaml-0-2 openssl rsync ruby1.9.1
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb rng-tools gnutls-bin libsasl2-modules-otp
libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal openssh-server ruby1.9.1-examples ri1.9.1
graphviz ruby1.9.1-dev
The following NEW packages will be installed:
ca-certificates foreman git git-core git-man heroku heroku-toolbelt libasn1-8-heimdal libcurl3-gnutls liberror-perl libgcrypt11 libgnutls26
libgpg-error0 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2
libp11-kit0 libroken18-heimdal librtmp0 libruby1.9.1 libsasl2-2 libsasl2-modules libtasn1-3 libwind0-heimdal libyaml-0-2 openssl rsync ruby1.9.1
0 upgraded, 32 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 28.1 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
foreman heroku heroku-toolbelt
E: There are problems and -y was used without --force-yes
(precise)root#localhost:/# heroku
bash: heroku: command not found
What happened?
In your apt-get output, the last line states:
E: There are problems and -y was used without --force-yes
If you look at the actual script Heroku uses to install itself on linux, that corresponds to apt-get install -y heroku-toolbelt line.
Try running this: apt-get install -y --force-yes heroku-toolbelt

Resources