You are not logged in.

#1 2008-12-05 11:50:42

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

No Usable Pacman Repositories Configured

Before we continue, I want to say that this is an Arch system and the following has to do with pacman-3.2.1.

Just for the sake of open source, I decided that I wanted to compile pacman, which it seems I successfully did, but there is a minor roll issue also when I execute it.

$ pacman -Syu
error: no usable package repositories configured.

I did a Google search, and found this thread where the guy successfully solved this problem after doing exactly what Cerebral said and editing /etc/pacman.conf. I did not find any other results from Google though.

To compile it, I did

$ ./configure
$ make
$ make install

Which is exactly how the pacman homepage said how to do it and how most other things are compiled too, which since I didn't use --prefix=/usr, it originally ended up /usr/local/bin like anything else would and I originally attempt to run it there using /usr/local/bin/pacman -Syu, which gave the same error, then I attempted what Cerebral said, but that did not work either and the same error is produced. I had the original pacman binary inside of my root directory, and it worked fine before I foolish removed it so I cannot test it right now (I am not concerned about it really because the goal is to compile pacman and use that one instead, but certainly it would've helped to know if /etc/pacman.conf is setup right after removing the original /etc/pacman.conf by mistake not paying attention too much to the --sysconfdir=/etc trigger - again not a real issue for me). Cerebral recommended that the OP of that thread/starter of that thread to issue:

$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make || return 1
$ make install || return 1

I believe he said that it shouldn't really be done with DESTDIR in his thread so I removed that part, but I also did try it with DESTDIR for the sake of saying I tried it if anyone wants to mention how I deviated from his post. He said what was important was the triggers on the ./configure line.

I was thinking my problem has something to do with repo-add (like I need to use it), but trying to figure out how to get that to work was hopeless because I couldn't find any db.pkg.tar.gz file, which is what I think it needs (the examples uses /path/to/your/repo.db.pkg.tar.gz, I am not entirely sure if it is a *.pkg.tar.gz  extension and db is just to say repo database or if *.db.pkg.tar.gz is the extension), but I did try using it with the contents located in /var/cache/pacman/pkg/ and /var/lib/pacman/. I viewed it's man/info page, and the online documentation is the exact same. Again, I think that's what I need to learn to understand, or at least it would be good to know, right, haha, but also that since I do not know much about repo-add, maybe it wouldn't be the solution. It's just an educated guess.

This is what my current /etc/pacman.conf looks like.

#
# /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
HoldPkg     = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst   = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/curl %u > %o
#CleanMethod = KeepInstalled

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options (all disabled by default)
#NoPassiveFtp
#UseSyslog
#ShowSize
#UseDelta
#TotalDownload

#
# 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
#
# 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.
#

# An example of a disabled remote package repository with multiple servers
# available. To enable, uncomment the following lines. You can add preferred
# servers immediately after the header and they will be used before the
# default mirrors.
[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# The file referenced here should contain a list of 'Server = ' lines.
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#Server = file:///home/custompkgs

Which was generated by Cerebral's method for compiling, and then adjusted so my original pacman could work (everything was originally commented out, and I found that out by reading further on).

If you guys have any recommendation that may cause me to lose everything I have, I am not afraid to try it and I will not lose anything important. tongue

Thank you in advance. big_smile

Last edited by Aprz (2008-12-05 12:02:02)

Offline

#2 2008-12-05 12:41:04

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: No Usable Pacman Repositories Configured

To make sure it's reading your conf file correctly, you could try pacman -v - which will spit out some info:

$ pacman -v
Root      : /
Conf File : /etc/pacman.conf
DB Path   : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/  
Lock File : /var/lib/pacman/db.lck
Log File  : /var/log/pacman.log
Targets   : None
error: no operation specified (use -h for help)

For even more detail, you can run pacman --debug 1

Offline

#3 2008-12-05 15:01:08

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: No Usable Pacman Repositories Configured

Cerebral wrote:

To make sure it's reading your conf file correctly, you could try pacman -v - which will spit out some info:

$ pacman -v
Root      : /
Conf File : /etc/pacman.conf
DB Path   : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/  
Lock File : /var/lib/pacman/db.lck
Log File  : /var/log/pacman.log
Targets   : None
error: no operation specified (use -h for help)

For even more detail, you can run pacman --debug 1

Interesting! I did not know that and I can see that I must of done something wrong because everything is pointing too /usr/local/ instead. Very interesting. Let me edit the files in there and check that out. tongue

$ Root      : /
Conf File : /usr/local/etc/pacman.conf
DB Path   : /usr/local/var/lib/pacman/
Cache Dirs: /usr/local/var/cache/pacman/pkg/  
Lock File : /usr/local/var/lib/pacman/db.lck
Log File  : /usr/local/var/log/pacman.log
Targets   : None
error: no operation specified (use -h for help)

That may be the culprit.

Edit: Yeap, it is working now when I edited the configuration files in /usr/local/etc/pacman.conf. That must mean that I forgot the --sysconfdir=/etc when I did ./configure, sounds right? I'll try recompiling it making sure that option is in there along with the options you mentioned in the post, which is funny that I was refering to what you said on that other post, failed, and all of the sudden here you are helping. Pretty neat. ^_^

Compiling now...

Nope, it still tries to read from /usr/local/etc/pacman.conf.

It still creates /usr/local/etc/pacman.conf, but I decided to experiment and remove it to see what would happen.

$ pacman -v
error: config file /usr/local/etc/pacman.conf could not be read.
$ ln -s /etc/pacman.conf /usr/local/etc/

necessary changes are made to /etc/pacman.conf

$ pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 local database is up to date

Which after I do make install following your instructions on the other thread, /etc/pacman.conf is overwritten with the new one that comments out everything and doesn't have all the necessary server/include lines at the bottom.

What's going on here? big_smile I compile it exactly like this:

$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
$ make install

Last edited by Aprz (2008-12-05 15:27:51)

Offline

#4 2008-12-06 15:09:38

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: No Usable Pacman Repositories Configured

Seems to be the correct steps - that's exactly what the pacman PKGBUILD does (see http://repos.archlinux.org/viewvc.cgi/p … ore-i686/)

I'd suggest taking a look at the output of make install and ensuring that everything is getting properly installed.  With your configure line having --prefix=/usr, it should install pacman to /usr/bin/pacman - make sure you're running that one.

Offline

Board footer

Powered by FluxBB