I'm trying to remove all the JDK's in my computer and only install the LTS version (JDK11).
When i run:
archlinux-java status
I get 3 environments (screenshot).
When i run pacman -Qe no JDK is listed, and when i run pacman -R openjdk14 the terminal returns "No package was found", but when i run java -version the OpenJDK-14 is listed (screenshot). How can i remove all the JDK's in my arch system?
Use pacman -Q | grep jre to find the names of the Java packages installed. The switch -e limits the output to explicit installed packages. In order to find everything you should'nt use any filters:
neon: ~ $ pacman -Qe | grep jre
neon: ~ $ pacman -Q | grep jre
jre-openjdk 14.0.2.u12-1
jre-openjdk-headless 14.0.2.u12-1
To remove a package use pacman -R <package name> or pacman -Rs <package name> if you want to remove unused dependencies as well.
Try the following command
sudo pacman -R jre14-openjdk
Related
I am trying to install a command:
$ sudo -s apt-get install net-tools
/bin/bash: apt-get: command not found
How can I install apt-get then?
I use command below to find Out My Linux Distribution Name and Version:
$ cat /etc/*-release
I get this below:
NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
Any ideas what should I do to install a command in Arch Linux?
First of all, Arch provides a beautiful, well maintained wiki. You may want to read it first before working with Arch. The pre-installed package manager is "pacman".
To install a package from the official repositories, you will need to use it like this:
# pacman -S <package name>
There is also a community maintained version, the Arch User Repository, for packages not part of the official repository.
I used this page https://wiki.archlinux.org/index.php/Pacman_Rosetta when I moved to Arch linux, it lists the equivalent commands for various common package managers, including apt and pacman.
For example:
+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
| Action | Arch | Red Hat/Fedora | Debian/Ubuntu | SLES/openSUSE | Gentoo |
+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
| Install a package(s) | pacman -S | dnf install | apt install | zypper install | emerge [-a] |
| Remove a package(s) | pacman -Rs | dnf remove | apt remove | zypper remove | emerge -C |
| Search for package(s) | pacman -Ss | dnf search | apt search | zypper search | emerge -S |
| Upgrade Packages | pacman -Syu | dnf upgrade | apt update; apt upgrade | zypper update | emerge -u world |
| ... |
If you really want to download apt, then:
Install pacaur
$ pacman -S pacaur
Install apt, from pacaur (no root)
$ pacaur -S apt
Add some repositories
Now you have working apt on arch linux
Arch linux does not generally use the apt package manager. It uses pacman:
https://wiki.archlinux.org/index.php/Pacman
You can't. Arch does not use the apt package system unlike Debian-based linuxes, like Ubuntu. Instead it uses the pacman package manager. However, you should try it out. Using pacman myself, I never had a problem with it, and you can still use it in order to install packages that you can get with the apt package manager.
As #Marcus mentioned, pacman is the builtin package manager. However, it won't give you access to AUR packages.
aurman is a nice wrapper that also searches and installs from AUR. yaourt used to be popular but according to the AUR wiki it is insecure and not featurefull. aurman cli works almost exactly like pacman so you can follow a pacman guide just the same. To get aurman:
cd ~/Downloads
git clone https://aur.archlinux.org/aurman.git
cd aurman
makepkg -Acs
# Change xxx below to downloaded version
sudo pacman -U aurman-xxx.pkg.tar.xz
Then, you can follow something like https://www.digitalocean.com/community/tutorials/how-to-use-arch-linux-package-management which I also pasted into this stackexchange answer here: https://raspberrypi.stackexchange.com/questions/510/how-do-i-install-packages-from-the-aur/84216
aurman can also be found on github: https://github.com/polygamma/aurman
Arch Linux does NOT use apt or apt-get, instead, however, it uses pacman. the syntax for pacman is quite different than apt-get; it uses -S to install packages instead of install. eg: sudo pacman -S [package].
Learn more at the man page or maybe type --help, wiki: https://wiki.archlinux.org/title/pacman
I'm just finished installing Ubuntu 13.10.
I want try Phalcon, and when I build the source (phalcon.so), I have this error :
from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
#include "pcre.h"
^
compilation terminated.
make: *** [phalcon.lo] Erreur 1
My installation of lamp is :
sudo apt-get install -y apache2 php5 mysql-server libapache2-mod-php5
php5-mysql php5-curl php5-imagick php5-mcrypt php5-memcache
php5-sqlite php5-xdebug php-apc php5-intl php-mongo php5-dev gcc
Can anybody help me ?
The latest version of Phalcon uses PCRE libraries.
You can install them like so:
sudo apt-get install libpcre3-dev
and then try and install Phalcon again
For CentOS you will need to use
sudo yum install pcre-devel
Credits: #xgretsch
For Mac you can use
brew install pcre
Credits #Brandon Romano
For Mac without brew
Go to https://www.pcre.org/ and download latest pcre:,
tar -xzvf pcre-8.42.tar.gz
cd pcre-8.42
./configure --prefix=/usr/local/pcre-8.42
make
make install
ln -s /usr/local/pcre-8.42 /usr/sbin/pcre
ln -s /usr/local/pcre-8.42/include/pcre.h /usr/include/pcre.h
Credits #user1377324
For mac osx maverick you can use
brew install pcre
if it gives you error, you can use
sudo ln -s /opt/local/include/pcre.h /usr/include/
sudo pecl install apc
I have installed pcre via homebrew in Big Sur, so linked as:
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
To include pcre.h file, search the package archives for the pcre.h file.
To do this I use a command called apt-file (
apt-get install apt-file
and
apt-file update
if you don’t have it installed).
Then search for the pcre package:
apt-file search -x "/pcre.h$"
The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:
kannel-dev: /usr/include/kannel/gwlib/pcre.h
libajax6-dev: /usr/include/ajax/pcre.h
libpcre3-dev: /usr/include/pcre.h
The last one is the one I want:
apt-get install libpcre3-dev
This will solve the problem with pcre.h file compilation problem. Hope it will help others, who may come to find an answer to this thread.
For MacOS monterey amd64 (darwin), it is necessary to create a symlink.
First, locate where the pcre.h was installed by Brew:
$ brew list pcre | grep 'pcre\.h$'
/opt/homebrew/Cellar/pcre/8.45/include/pcre.h
Then, gets the directory that GCC is looking for header (.h) files:
$ cpp -v
...
#include <...> search starts here:
/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include # <---- we are going to use this one
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
Finally, create a symlink to the pcre.h file, so that GCC will find it in its search path:
ln -s /opt/homebrew/Cellar/pcre/8.45/include/pcre.h \
/Library/Developer/CommandLineTools/usr/include/pcre.h
To test if it worked, we can use the following C code:
#include <stdio.h>
#include <pcre.h>
int main() {
printf("lala popo");
return 0;
}
And run:
gcc test.c -o test
🎉🎉🎉🎉🎉🎉
Using macOS Monterey 12.6 on an M1 Pro MacBook Pro, here are the steps necessary to install outh extension for PHP 8.1 using brew:
brew install pcre
brew install pcre2
sudo ln -s /opt/homebrew/include/pcre.h /usr/local/include/
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
sudo pecl install oauth
I Downloaded mono-complete 3.10 by adding following repository and signing key in synaptic. After Downloading mono-complete-3.10, I installed this package in another fresh machine, but in fresh machine it gives lot of errors. Please suggest me how to install this downloaded package on another machine (offline).
Repo:
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.10.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
Signing Key:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
I see different versions of ubuntu in your tags.On what version of ubuntu you are installing your mono? Did you fully read this article?
Why don't you just use smth like apt-get install mono-complete monodevelop e.g.?
I'm installing c++ boost library by pacman -Ss boost-libs. After installation, I want to know where my package is installed in my system.
Is there any pacman command for doing so?
I am not on my arch now to check, but I bet pacman -Ql boost-libs or pacman -Qk boost-libs will do the trick by providing you with the list of files installed by the package.
pacman -Q boost-libs #Display version
pacman -Ql boost-libs #Display file list provided by local package
pacman -Qk boost-libs #Check the local package database
pacman -Qo /path/to/file #Check if the file is owned by any package
As of today, in pacman v6.0, the command is slightly changed: pacman -Fl package-name rather than pacman -Ql package-name
I want to use Apache 2.4.4 with SVN on Ubuntu server 12.04 (Precise Pangolin). But when I use
apt-get install libapache2-svn
I get the following dependencies error
The following packages have unmet dependencies:
libapache2-svn : Depends: apache2.2-common but it is not going to be installed
Googling around I got some suggestion about compiling from source by hand. I don't know how to do that. How can I do it?
I have two solutions:
Follow the instructions in this Server Fault Q&A.
*Note: Create another user if you're using a root account on the server.
I've asked Ondřej Surý on Launchpad to add Subversion to his Apache PPA. You can add Ondřej Surý's PPA to perform a normal update/upgrade.
You did ask Ondrej to include Subversion in his PPA launchpad. But I couldn't install the libapache2-svn package after adding Ondrej's PPA.
Somehow the instructions provided for compiling didn't work for me so here's an alternative way to get it working.
Reference:
(https://askubuntu.com/questions/312568/where-can-i-find-a-subversion-1-8-binary)
WANDisco has Subversion 1.8 for Ubuntu then:
sudo sh -c 'echo "# WANdisco Open Source Repo" >> /etc/apt/sources.list.d/WANdisco.list'
sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
After that:
apt-cache show subversion | grep '^Version:'
And then you should be good to install normally:
sudo apt-get install subversion libapache2-svn