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

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

Related

PCRE2 not found in Mac

I have installed pcre2 version 10.37 by downloading the tar file and doing
./configure
make
sudo make install
When I run
pcre2 --version
or
which pcre2
In the terminal, I get command not found.
I am building my project that needs "pcre2" to compile successfully but after running "make" in the project directory I get the following:
ERROR! pcre2 library not found, go get it
from www.pcre.org. Or from packages:
Debian/Ubuntu: apt install libpcre2-dev
Fedora: dnf install pcre2-devel
CentOS/RHEL: yum install pcre2-devel
make: *** [config.status] Error 1
I can find the following files in /usr/local/lib/

unable to run apt-get -f install on debian

I have a system that is due to be upgraded but I'm having conflicts with apt-get -f install:
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
login sysvinit-utils util-linux
Suggested packages:
kbd util-linux-locales
The following packages will be upgraded:
login sysvinit-utils util-linux
3 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
13 not fully installed or removed.
Need to get 0 B/1775 kB of archives.
After this operation, 1886 kB of additional disk space will be used.
Do you want to continue? [Y/n]
E: Sub-process false returned an error code (1)
E: Prior errors apply to /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/util-linux_2.36.1-8_arm64.deb
E: Prior errors apply to /var/cache/apt/archives/login_1%3a4.8.1-1_arm64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 9765 files and directories currently installed.)
Preparing to unpack .../sysvinit-utils_2.96-7_arm64.deb ...
Unpacking sysvinit-utils (2.96-7) over (2.88dsf-59) ...
dpkg: error processing archive /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb (--unpack):
trying to overwrite '/lib/init/vars.sh', which is also in package initscripts 2.88dsf-59
Errors were encountered while processing:
/var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't understand why it says E: Sub-process false returned an error code (1) after I confirm installation of the packages. Can anyone help me with this?
initscripts is a purely virtual package, so it is safe to give dpkg permission to overwrite it. Open the terminal and type:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/sysvinit-utils_2.96-7_arm64.deb
If you're not using dpkg directly and using an apt front-end like apt or apt-get, the following command defines the same custom dpkg option to use as the previous command.
sudo apt-get -o Dpkg::Options::="--force-overwrite" install sysvinit-utils
Try to flush the cache and reinstall then :
apt autoremove
apt clean
apt autoclean
apt update
apt install -f
if it doesn't help, try to remove the problematic packages and reinstall them normally.

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

Failed to fetch cleishm/neo4j/ubuntu/dists/trusty/main/binary-amd64/Packages

I am using Win10 Linux substyem which is
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Then I tried to follow the libneo4j-client-dev installation guide for ubuntu
$ sudo add-apt-repository ppa:cleishm/neo4j
$ sudo apt-get update
$ sudo apt-get install neo4j-client libneo4j-client-dev
when executing the 'apt-get update', I found:
....
Err http://ppa.launchpad.net trusty/main amd64 Packages
404 Not Found
....
W: Failed to fetch http://ppa.launchpad.net/cleishm/neo4j/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I once guessed it might be my system's fault, but after removing this ppa repository, this missing packages come back to appear again.
Has anyone seen the same problem and solved?
Thanks for your attention in advance.
EDIT: More information
The ppa information related is
/etc/apt/sources.list.d/cleishm-neo4j-trusty.list:deb http://ppa.launchpad.net/cleishm/neo4j/ubuntu trusty main
For comparison, the related ppa information on my ubuntu-virtualBox which libneo4j-client-dev is successfully installed is
/etc/apt/sources.list.d/cleishm-ubuntu-neo4j-xenial.list:deb http://ppa.launchpad.net/cleishm/neo4j/ubuntu xenial main
Launchpad was only publishing artifacts for the Xenial distribution. I've copied the packages to the Trusty distribution as well, so it might work now. Otherwise, I suggest upgrading to Xenial.

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