You are not logged in.
Pages: 1
I am using Arch Linux, 5.0.16. I tried to install BlackArch on a VM but found out that I can just install the tools to my main Arch system. I let pacman do its thing, and went to play some Minecraft, but soon found out that I don't have a spare 60GB to give out to pentesting tools, so tried to remove it using
sudo pacman -R blackarch
but that spits out the error that quite a few of the packages were dependencies of other ones.
I checked the man pages for a way to get around this and found that this removed about half of the packages:
sudo pacman -Ru blackarch
I then tried to run
sudo pacman -Rcu blackarch
but was given this error:
error: config file /etc/pacman.d/blackarch-mirrorlist could not be read: No such file or directory
I looked for solutions, and so as directed here: https://unix.stackexchange.com/question … arch-linux I ran
sudo mkdir -p /etc/pacman.d
and then tried to refresh pacman, but was then greeted with even more errors:
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '<html>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 2: directive '<head><title>301 Moved Permanently</title></head>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 3: directive '<body>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 4: directive '<center><h1>301 Moved Permanently</h1></center>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 5: directive '<hr><center>nginx</center>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 6: directive '</body>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 7: directive '</html>' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '<html>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 2: directive '<head><title>301 Moved Permanently</title></head>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 3: directive '<body>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 4: directive '<center><h1>301 Moved Permanently</h1></center>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 5: directive '<hr><center>nginx</center>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 6: directive '</body>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 7: directive '</html>' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '<html>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 2: directive '<head><title>301 Moved Permanently</title></head>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 3: directive '<body>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 4: directive '<center><h1>301 Moved Permanently</h1></center>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 5: directive '<hr><center>nginx</center>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 6: directive '</body>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 7: directive '</html>' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '<html>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 2: directive '<head><title>301 Moved Permanently</title></head>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 3: directive '<body>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 4: directive '<center><h1>301 Moved Permanently</h1></center>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 5: directive '<hr><center>nginx</center>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 6: directive '</body>' in section 'multilib' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 7: directive '</html>' in section 'multilib' not recognized.
error: config file /etc/pacman.d/blackarch-mirrorlist could not be read: No such file or directory
I really don't know what to do. Help would be much appreciated.
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
Your mirrorlist is a html file for a 301 error ("Moved Permanently"), update it using reflector or from https://archlinux.org/mirrorlist/
Then post the actual output for "sudo pacman -Rs blackarch"
I hope you didn't really effectively run "sudo pacman -Rcu blackarch"
Offline
I forgot to mention that I tried reflector, and for some reason, reflector doesn't work, as I get this error:
reflector may be found in the following packages:
community/reflector 2021-1 /usr/bin/reflector
I couldn't find an AUR version of reflector, and I can't really use pacman. I don't really know how to get reflector working.
I get that
sudo pacman -Rc blackarch
would be bad, but why would running
sudo pacman -Rcu blackarch
be bad?
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
...update it using reflector or from https://archlinux.org/mirrorlist/
Offline
I get that
sudo pacman -Rc blackarch
would be bad, but why would runningsudo pacman -Rcu blackarch
be bad?
Neither are "bad" but depending on where blackarch injects itself harmful.
Whenever you issue -Rc it's a good idea to take a close look at the list of to-be-removed packages.
Offline
After using https://archlinux.org/mirrorlist/ all of the errors regarding
/etc/pacman.d/mirrorlist
were gone, however, I still get an error when using pacman:
error: config file /etc/pacman.d/blackarch-mirrorlist could not be read: No such file or directory
It is to my understanding that blackarch made it so it has to find blackarch-mirrorlist, but I deleted it, and now pacman freaks out.
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
I can just install the tools to my main Arch system. I let pacman do its thing...
You can't install blackarch with pacman (per defaults). You likely can with makepkg. And you could with pacman if either 1) you modified your pacman.conf, or 2) you ran some horrible script downloaded from the web as root. Which one of these did you do? If the second one, which script did you use? Read and understand the script to be able to assess what exactly it actually did.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Offline
Ascension wrote:I can just install the tools to my main Arch system. I let pacman do its thing...
You can't install blackarch with pacman (per defaults). You likely can with makepkg. And you could with pacman if either 1) you modified your pacman.conf, or 2) you ran some horrible script downloaded from the web as root. Which one of these did you do? If the second one, which script did you use? Read and understand the script to be able to assess what exactly it actually did.
I followed the guide here: https://blackarch.org/downloads.html#install-repo
Post the contents of your pacman.conf
When I was doing
cat /etc/pacman.conf
I noticed it said
[blackarch]
include = /etc/pacman.d/blackarch-mirrorlist
at the end, so I rmoved it, and ran
sudo pacman -Syu
but that came up with a new set of errors:
:: Synchronizing package databases...
error: failed to update core (no servers configured for repository)
error: failed to update extra (no servers configured for repository)
error: failed to update community (no servers configured for repository)
error: failed to update multilib (no servers configured for repository)
thepoon is up to date
error: failed to synchronize all databases
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
Post the contents of your pacman.conf
Offline
Slithery wrote:Post the contents of your pacman.conf
Sorry I forgot to do that
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#TotalDownload
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[thepoon]
Server = https://archrepo.thepoon.fr
Server = https://mirros.celianvdcb.fr/archlinux/thepoon
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
Did you uncomment any of the servers in the mirrorlist?
Offline
Did you uncomment any of the servers in the mirrorlist?
That might be a problem lmao.
I just uncommented the servers from the state that I'm in, and it works just fine.
I still need a way to remove the 30GB of unwanted programs on my computer though.
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
Remove the packages…
ikn about blackarch, but if you run -Rcu blackarch, take a close look at the packages it wants to remove.
If that's all the blackarch stuff you long to lose, go for it. If it's your entire system because BA replaces glibc or so, you'll have to be more nimble…
Offline
Remove the packages…
ikn about blackarch, but if you run -Rcu blackarch, take a close look at the packages it wants to remove.
If that's all the blackarch stuff you long to lose, go for it. If it's your entire system because BA replaces glibc or so, you'll have to be more nimble…
Thanks, I did that, but only 75MB of stuff was removed, so I ran sudo pacman -Sc to free up some space, but as a collective whole, It only freed ~10GB of space, and I don't really know what that other 20GB is.
b e a n s w i l l c o n q u e r t h e w o r l d .
Offline
And in the future, do not accept random scripts written by idiots and run them as root on your system. Blackarch is useful in learning about penetration testing in precisely one way: you tested it, your system was penetrated, hopefully you'll learn from that.
EDIT: FYI, if you haven't done so recently, you should also do a full system upgrade as the strap.sh has set you up for a partial upgrade.
Last edited by Trilby (2021-02-24 17:44:50)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Offline
Pages: 1