You are not logged in.

#1 2009-01-13 21:01:54

_matrix_
Member
Registered: 2008-11-21
Posts: 6

Pacman Commands Not Working From Command Line

Hi...

I ran sudo pacman -Syudf in the terminal and the system said there was a new version of pacman and if I wanted to cancel the current installation in order to upgrade pacman before proceeding.

I selected yes and pacman started upgrading. The system froze and I rebooted. Since then when I tried running pacman it said it could not be found. I did a man pacman and there was no manual entry.

I compiled pacman from source and I get a manual when I do man pacman but when I try $ sudo pacman -Syu, I get the following:
Password:
sudo: pacman: command not found.

How do I fix pacman so I can do installations and configurations of packages?

Any help is appreciated.

Last edited by _matrix_ (2009-01-13 21:02:28)


_Matrix_

Offline

#2 2009-01-13 21:34:25

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Pacman Commands Not Working From Command Line

Ouch, that's a good one roll
Can you check that pacman actually resides in /usr/bin/ ? [ and it is executable ]
Presuming that it does, try 'pacman' as root. Does it do anything ?
If it doesn't, try the full path: '/usr/bin/pacman' as root, anything ?

Deej

Offline

#3 2009-01-13 23:09:31

nowahn
Member
From: elsewhere
Registered: 2008-12-05
Posts: 75

Re: Pacman Commands Not Working From Command Line

if pacman is not in your system, you can try and install it from you installation CD :
- boot on the installation CD
- if you have a core CD
   - start the installation process (/arch/setup)
   - choose to install from CD (this will mount the packages to /scr)
   - exit the installation program
   - mount your '/' partition to /mnt
   - run this :

pacman --root /mnt -U /scr/core/pacman*

- if you have a ftp CD
   - same process, except you need to setup your internet connection and use -S instead of -U
note that if you have more partitions in your system, some might need to be mounted as well


take time to daydream, inspiration comes ...

Offline

#4 2009-01-13 23:29:22

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,421
Website

Re: Pacman Commands Not Working From Command Line

pacman -Syudf

Why would you run that instead of "pacman -Syu"? That seems like it's bound to mess up your system.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2009-01-13 23:42:24

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,687
Website

Re: Pacman Commands Not Working From Command Line

It does sound like a suicide mission hmm

Offline

#6 2009-01-14 02:31:01

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,867
Website

Re: Pacman Commands Not Working From Command Line

Xyne wrote:
pacman -Syudf

Why would you run that instead of "pacman -Syu"? That seems like it's bound to mess up your system.

And my guess is that would be exactly what has happened...  Never, ever use -f or -d with "pacman -Syu".

Fixing in not easy.  Download pacman-static from the archfr repos (search the forums to find them) and then try reinstalling pacman using pacman-static.

Offline

#7 2009-01-14 19:54:07

_matrix_
Member
Registered: 2008-11-21
Posts: 6

Re: Pacman Commands Not Working From Command Line

Okay...

I tried what Nowahn said but that did not work. When I ran the pacman command suggested, I got an error saying something about not finding pacman which I took to mean it was not in /scr.

I revisited my testing of the compile I did from source and it partially works but when I try installing a program it seems like pacman is not seeing the database where it is supposed to be.

For instance, when I try installing firefox which is already installed I am supposed to get a message saying it is there and if I want to continue. What I get is a list of all other updates for the system including an installation of firefox.

Seems to me I need to point pacman to the right directories and I am not sure what those are supposed to be and which config file to use to accomplish that. I have been trying the /usr/local/etc/pacman.conf file and I know it is supposed to be in /etc/pacman.conf. but pacman says it cannot read the /usr/local/etc/pacman.conf file so I created one in that location. That is how I got it working like I said above.

I think the key is pointing pacman to the correct directories and configuration files.

Thanks for your help thus far.


_Matrix_

Offline

#8 2009-01-14 20:36:02

nowahn
Member
From: elsewhere
Registered: 2008-12-05
Posts: 75

Re: Pacman Commands Not Working From Command Line

_matrix_ wrote:

I tried what Nowahn said but that did not work. When I ran the pacman command suggested, I got an error saying something about not finding pacman which I took to mean it was not in /scr.

well, I think I did a mistake, packages are in /src/core/pkg or /src/pkg/core or something like this (just go there and check where they are)

_matrix_ wrote:

I know it is supposed to be in /etc/pacman.conf. but pacman says it cannot read the /usr/local/etc/pacman.conf file

quite strange. where did the compilation installed pacman ? (the pacman package installs the pacman binary in /usr/bin)
you can also add this option to the pacman command t ouse a spécific config file:

pacman -- config /etc/pacman.conf ...

(but /etc/pacman.conf should be the default)


take time to daydream, inspiration comes ...

Offline

#9 2009-01-14 21:57:42

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,687
Website

Re: Pacman Commands Not Working From Command Line

List of pacman files and their locations:
http://pastebin.ca/1308432

Offline

#10 2009-01-16 21:51:31

_matrix_
Member
Registered: 2008-11-21
Posts: 6

Re: Pacman Commands Not Working From Command Line

Right...

Again tried what Nowahn said. The correct location is /src/core/pkg. I ran the comman pacman --root /mnt -U /src/core/pkg/pacman in the /src/core/pkg directory and I get an error listing all dependancies that must be satisfied. When I install one of them, then that one also has dependancies and the list goes on.

Is there a command or switch that will do the installation and find and install all dependancies?


_Matrix_

Offline

#11 2009-01-16 22:04:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pacman Commands Not Working From Command Line

Allan recommended pacman.static so that you wouldn't have to worry about deps.

Re your actual question, only pacman -S resolves dependencies, and it needs a valid repo to do that.

Offline

#12 2009-01-17 10:57:49

nowahn
Member
From: elsewhere
Registered: 2008-12-05
Posts: 75

Re: Pacman Commands Not Working From Command Line

_matrix_ wrote:

I ran the comman pacman --root /mnt -U /src/core/pkg/pacman in the /src/core/pkg directory and I get an error listing all dependancies that must be satisfied

well, I think this means:
- your database is corrupted, I don't know how to fix it
or
- some packages in your system depends on newer kernel version than the one on the installation CD (do listed dependancies show some <= ?). you need to install the last version of the kernel. I suggest you setup your internet connection and run -Syu for a full upgrade (still with the --root option)

note: if this still doesn't works, please try pacman.static as suggested by Allan


take time to daydream, inspiration comes ...

Offline

#13 2009-01-17 13:19:05

_matrix_
Member
Registered: 2008-11-21
Posts: 6

Re: Pacman Commands Not Working From Command Line

Thanks for the reply guys.

I am trying the pacman-static link http://repo.archlinux.fr/i686/pacman-st … pkg.tar.gz using wget but have had no success after running the command for over 8 hours. Got an error 404 eventually.

If anyone has a link to the file I will appreciate it.I am using http://wiki.archlinux.org/index.php/Ins … ting_Linux right now.


_Matrix_

Offline

#14 2009-01-17 14:50:23

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Pacman Commands Not Working From Command Line

You have compiled pacman from source. Have you installed it with "make install" ?. After doing that  you can use the following options to point pacman to the default locations. 


      --config <path>  set an alternate configuration file
      --logfile <path> set an alternate log file
  -r, --root <path>    set an alternate installation root
  -b, --dbpath <path>  set an alternate database location
      --cachedir <dir> set an alternate package cache location


The default locations are
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


And i think  pacman will install to /usr/local/bin

Get well soon ;-)


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#15 2009-01-17 15:59:01

_matrix_
Member
Registered: 2008-11-21
Posts: 6

Re: Pacman Commands Not Working From Command Line

Pacman installation SOLVED:

$ sudo pacman -S firefox
error: invalid name for database entry 'local'
error: invalid name for database entry 'sync'
warning: firefox-3.0.5-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): firefox-3.0.5-1 
Total Download Size:    0.00 MB
Total Installed Size:   3.35 MB
Proceed with installation? [Y/n] n
Got it working except for two errors:
error: invalid name for database entry 'local'
error: invalid name for database entry 'sync'

To get pacman working I compiled from source and edited the pacman.conf file to point to where the local database is in /var/lib/pacman/. Then I did pacman -Syy and Syu so now when I try installing firefox which is already there I get the message telling me it is there as seen above.

That is what I was after all along.

Thanks to all those who contributed.

We can mark the pacman installation command as solved. Still need to work out the other two errors:
error: invalid name for database entry 'local'
error: invalid name for database entry 'sync'


_Matrix_

Offline

#16 2010-02-19 17:27:39

jamtat
Member
Registered: 2008-03-13
Posts: 205

Re: Pacman Commands Not Working From Command Line

I just ran into a similar problem after using the -f switch as well. I resolved it by downloading pacman.static, linked to from http://wiki.archlinux.org/index.php/Ins … ting_Linux ; I copied that (as sudo) to /usr/bin, then ran the command sudo pacman.static -S pacman, which downloaded and installed the latest pacman. I then deleted /usr/bin/pacman.static. All now seems back to normal on this system. I should mention that the files /etc/pacman.conf and the directory (with contents) /etc/pacman.d were still present on my system.

James

Offline

#17 2010-02-19 20:57:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Pacman Commands Not Working From Command Line

jamtat - 13 month old thread. Read this please.

Closing.

Offline

Board footer

Powered by FluxBB