Installing Java 8 on cloud9 - java-8

I'm trying to install java 8 on cloud9 through the webupd8 PPA. So I'm adding the repository
sudo add-apt-repository ppa:webupd8team/java
Next I do the update and finally when I run the command
sudo apt-get install oracle-java8-installer
I get the error
E: Unable to locate package oracle-java8-installer
Any ideas how can I get through that and istall java 8 on cloud9?

As noted by christophetd, I completed the following steps and everything installed without issue:
$ sudo vim /etc/apt/sources.list
Add the following lines of code to the file:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
$ sudo apt-get update
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get install oracle-java8-installer
$ java -version
java version "1.8.0_101"

Add the two following lines to your file /etc/apt/sources.list (which you can create if it does not exist)
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
Then run sudo apt-get update, and you should be able to install oracle-java8-installer.
This basically does the add-apt-repository manually. I suspect the issue is due to the fact that the default source files /etc/apt/sources.list.d/* are mounted as read-only (see for instance this topic on Cloud9 community)

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 error on ubuntu 10 ec2 server while apt install

sudo apt install tasksel
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package libopencv-video2.4v5 needs to be reinstalled, but I can't find an archive for it.
I'd recommend : sudo dpkg --remove --force-all libopencv-video* &&
sudo apt-get update
sometimes it needs the machine to be restarted
Also you could try :
apt-get -f install
apt-get autoremove
apt-get purge libopencv-video*
apt-get purge
apt-get clean
if apt didn't work you can also manually download .deb file and install it using dpkg -i file.deb
Note: pick the file based on your ubuntu version and arch
https://packages.ubuntu.com/trusty/i386/libopencv-video2.4

Clickhouse install on Ubuntu 16.04 failing

Much appreciated if someone tells me how to install on Ubuntu 16.04.
I've tried this:
Steps I took:
echo "deb http://repo.yandex.ru/clickhouse/trusty stable main" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4 # optional
sudo apt-get update
sudo apt-get install clickhouse-client clickhouse-server-common
Errors:
root#c-2:~# sudo apt-get install clickhouse-client clickhouse-server-common
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:
clickhouse-client : Depends: clickhouse-server-base (= 1.1.54245) but it is not going to be installed
clickhouse-server-common : Depends: clickhouse-server-base (= 1.1.54245) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
You need to use:
deb http://repo.yandex.ru/clickhouse/xenial stable main
Its literally in the line bellow where you copy pasted from in the docs:
For other Ubuntu versions, replace trusty to xenial or precise.
Version 16.x = xenial
... though it would be nice if they just renamed the paths to 12.x, 14.x and 16.x instead of using code names.
Do like this
echo "deb https://repo.yandex.ru/clickhouse/deb/stable main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
sudo apt-get update
sudo apt-get install clickhouse-client clickhouse-server
I use https which is working. http not working in deb

How to install g++ 4.9 on Debian Wheezy armel?

My Debian 7 armel embedded system currently has g++ 4.6, and I'd like to upgrade to g++ 4.9 to use new C++11 features. How do I do that?
My current sources.list contents is:
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.us.debian.org/debian wheezy main non-free
deb-src http://ftp.us.debian.org/debian wheezy main non-free
A simple apt-get install of the package does not work:
root#arm:~# apt-get install g++-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package g++-4.9
E: Couldn't find any package by regex 'g++-4.9'
Another workaround could be to install the g++ 4.9 packages from "Jessie", according to this blog post. Briefly, you would have to tell APT to use the Jessie repos while you are installing the new G++. First bring the current Wheezy up-to-date:
sudo apt-get update
sudo apt-get upgrade
Then do a backup :-) and edit /etc/apt/sources.list so that you replace the string "wheezy" with "jessie":
sudo cp /etc/apt/sources.list /etc/apt/sources.list.WHEEZY
sudo vi /etc/apt/sources.list
Now update the package list and install the 4.9 version of GCC/G++:
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
After this revert to the "original" package list:
sudo cp /etc/apt/sources.list.WHEEZY /etc/apt/sources.list
sudo apt-get update
This leaves the original GCC,G++ in place. If you wish to compile with the 4.9 version, then either set the CC and CXX env vars accordingly or invoke the compilers as gcc-4.9 or g++-4.9 explicitly.
Probably-required: packaging-dev, ubuntu-dev-tools
Set up pbuilder
(this lets you build a package in a chroot without polluting your system with build-dependency packages)
sudo pbuilder create
if you want to build for a specific distribution, (pbuilder uses the build system release in a chroot) you can use pbuilder-dist [precise/oneric/trusy/etc...] create
Get debian source
pull-debian-source gcc-4.9 [4.9.0-6]
specific debian revision is optional, but can be useful if you want to pull experimental/unstable/testing/stable revisions
you can also pull from specific ubuntu distros by adding them to sources.list as a deb-src and using sudo apt-get src
Build Package
sudo pbuilder build gcc-4.9_4.9.0-6.dsc
In the files downloaded there is a .dsc file, for the most recent gcc it is gcc-4.9_4.9.0-6.dsc which is a package descriptor file. .orig.tar.[gz/xz] is the source tarball.
Create local Apt-repository
mkdir /convenient/place/for/repo
cp /var/cache/pbuilder/result/* /path/to/repo
cd /path/to/repo
apt-ftp archive packages . > Packages
sudo echo "deb [trusted=yes] file:/local/repo/Packages ./" > /etc/apt/sources.list.d/gcc-repo.list`
Note you can also do this step with .debs downloaded from anywhere (skip step 1-3)
Install
apt-get update; apt-get install gcc-4.9 g++-4.9
Instead of using the jessie packages, it would be better to check to see if it's been back-ported to wheezy. Add this to your /etc/apt/sources.list:
deb http://http.debian.net/debian wheezy-backports main
and do an apt-get update and see if you can install it then.
There is a gcc-4.9-backport now.
sudo apt-get update && sudo apt-get install gcc-4.9-backport

LibreOffice OnLine build

I'm trying to compile libreoffice, to use it "online", i.e: in a web browser (see a demo here: http://www.youtube.com/watch?v=CVR7HqDokmA
).
When running the executable, I get this error:
**Gdk-ERROR **: Unsupported GDK backend: broadway**
These are the steps I do to compile libreoffice on a Ubuntu 11.10 Linux box:
cd /opt
mkdir -p libreoffice
cd libreoffice/
git clone git://anongit.freedesktop.org/libreoffice/core
cd core
cat >> /etc/apt/sources.list << EOT
deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu oneiric main
EOT
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1378B444
sudo apt-get update
sudo apt-get build-dep libreoffice
sudo apt-get install -y libgnomevfs2-dev
sudo apt-get install -y doxygen
./autogen.sh --enable-gtk3 --without-java --disable-mozilla --without-system-mozilla
make
make dev-install
cd install/program;
. ./ooenv;
export SAL_USE_VCLPLUGIN=gtk3
export GDK_BACKEND=broadway
./soffice --writer
What is the problem here? Is there any other compilation option I can check?
Seems your GTK hasn't been compiled with the broadway backend enabled. Depends on your distro.
As liberforce correctly pointed out, you need a BROADWAY-enabled GTK.
I did just discover ubuntu 12.04 ships with a BROADWAY-enabled GTK...

Resources