LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 04-03-2004, 10:47 AM   #1
ticro
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
rpm error: cannot create %sourcedir


very newbie here

using redhat 9

I am trying to install samba 3.0.2a-1. This is the first rpm install I've tried. When using the install command # rpm -ivh [filename] I get the following error message:

error: cannot create %sourcedir/usr/src/redhat/sources

Do I have to make a directory to put it in? What directory do I put it in?If so how do I specify rpm to put it there?

Thanks

Ticro
 
Old 04-03-2004, 01:42 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 451

Rep: Reputation: 32
That meesage either means you need to be root to create a directory, or a directory is missing, or the directory is write protected. It could also mean the directory is undefined because of an error in the rpm file.
 
Old 04-03-2004, 02:49 PM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
*are you root?
*is the file a .RPM or a .SRC.RPM which is different?
 
Old 04-26-2004, 12:37 AM   #4
sawoy
LQ Newbie
 
Registered: Mar 2004
Location: Russia
Posts: 13

Rep: Reputation: 0
i also find the answer on this question.
platform: Red Hat Advansed Server 3.0

i'm root.
i want to install mc-4.5.55-5.src.rpm

when i run:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[root@rhas root]# rpm -ivvh /sawoy/mc-4.5.55-5.src.rpm
D: ============== /sawoy/mc-4.5.55-5.src.rpm
D: Expected size: 5973578 = lead(96)+sigs(433)+pad(7)+data(5973042)
D: Actual size: 5973578
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0
warning: /sawoy/mc-4.5.55-5.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
D: added source package [0]
D: found 1 source and 0 binary packages
D: Expected size: 5973578 = lead(96)+sigs(433)+pad(7)+data(5973042)
D: Actual size: 5973578
error: cannot create %sourcedir /usr/src/redhat/SOURCES
D: closed db index /var/lib/rpm/Pubkeys
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

how i can install this package?
 
Old 04-26-2004, 01:40 AM   #5
sawoy
LQ Newbie
 
Registered: Mar 2004
Location: Russia
Posts: 13

Rep: Reputation: 0
i fiound answer.
 
Old 02-09-2008, 08:15 AM   #6
rshendershot
LQ Newbie
 
Registered: Jun 2006
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by sawoy View Post
i fiound answer.
I have the same problem AMD x86_64 fedora 8. What was your solution?
 
Old 02-09-2008, 03:50 PM   #7
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
One way at least is to build the rpm

Suppose the .src.rpm is in /usr/src

rpmbuild --rebuild package.src.rpm

You should then find the binary rpm in the /usr/src/redhat somewhere, and install as usual
 
Old 01-16-2012, 01:15 PM   #8
joelgriffiths
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
I'm just adding this because it was never properly answered and the thread indexes high on google:

# yum install rpm-build

You are probably missing the rpm-build package. That package creates the missing directory.
 
1 members found this post helpful.
Old 03-28-2013, 07:24 PM   #9
herohat
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by joelgriffiths View Post
I'm just adding this because it was never properly answered and the thread indexes high on google:

# yum install rpm-build

You are probably missing the rpm-build package. That package creates the missing directory.


Code:
root@server [~]# yum install rpm-build
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.steadfast.net
 * base: mirror.sanctuaryhost.com
 * epel: mirror.steadfast.net
 * extras: mirror.team-cymru.org
 * update: mirror.sanctuaryhost.com
addons                                                                       | 1.9 kB     00:00     
base                                                                         | 1.1 kB     00:00     
epel                                                                         | 3.6 kB     00:00     
extras                                                                       | 2.1 kB     00:00     
update                                                                       | 1.9 kB     00:00     
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rpm-build.i386 0:4.4.2.3-32.el5_9 set to be updated
--> Processing Dependency: rpm = 4.4.2.3-32.el5_9 for package: rpm-build
--> Running transaction check
---> Package rpm.i386 0:4.4.2.3-32.el5_9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch              Version                         Repository           Size
====================================================================================================
Installing:
 rpm-build              i386              4.4.2.3-32.el5_9                update              304 k
Installing for dependencies:
 rpm                    i386              4.4.2.3-32.el5_9                update              1.2 M

Transaction Summary
====================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : rpm                                                                          1/2 
Error unpacking rpm package rpm-4.4.2.3-32.el5_9.i386
error: unpacking of archive failed on file /etc/rpm: cpio: mkdir
  Installing     : rpm-build                                                                    2/2 
Error unpacking rpm package rpm-build-4.4.2.3-32.el5_9.i386
error: unpacking of archive failed on file /usr/src/redhat: cpio: mkdir

Failed:
  rpm.i386 0:4.4.2.3-32.el5_9                   rpm-build.i386 0:4.4.2.3-32.el5_9                  

Complete!
root@server [~]# 

root@server [~]# ls -la /usr/src/
total 16
drwxr-xr-x  5 root root 4096 Mar 28 15:50 ./
drwxr-xr-x 16 root root 4096 Mar 28 19:39 ../
drwxr-xr-x  2 root root 4096 May 11  2011 debug/
drwxr-xr-x  4 root root 4096 Mar 28 18:44 kernels/
?---------  ? ?    ?       ?            ? redhat
root@server [~]#
Any ideas?... this is a CentOS release 5.9 (Final)
 
Old 03-28-2013, 08:43 PM   #10
John VV
Guru
 
Registered: Aug 2005
Posts: 12,691

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
you are aware that this thread is from 2004 and for the now very dead RH9
RH9 did not have "yum"
that was not added until many years latter in RHEL5
 
Old 03-30-2013, 04:21 PM   #11
herohat
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
you are aware that this thread is from 2004 and for the now very dead RH9
RH9 did not have "yum"
that was not added until many years latter in RHEL5

This thread was answer in 2012 and I am talking about Centos 5.9 with "yum".
 
Old 04-01-2013, 02:52 AM   #12
digity
Member
 
Registered: Apr 2005
Posts: 105

Rep: Reputation: 15
Ya, any word on this? I'm getting the same error on CentOS 5.9 too. I'm trying to install (or build?) a package that is only available as a *.src.rpm file.
 
Old 04-01-2013, 08:17 AM   #13
herohat
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by digity View Post
Ya, any word on this? I'm getting the same error on CentOS 5.9 too. I'm trying to install (or build?) a package that is only available as a *.src.rpm file.
This is an unsual case, I can't do basically anything, I can't delete, rename or change any attribute the folder: /usr/src/redhat
 
Old 04-01-2013, 08:27 AM   #14
John VV
Guru
 
Registered: Aug 2005
Posts: 12,691

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
this is a red hat 9 thread
you are not using rh9

please start a new thread with CentOS 6.4 or centOS 5.9 in the title

the solution for this on RH9 is to install a modern operating system

if you are getting this
Quote:
error: cannot create %sourcedir/usr/src/redhat/sources
then make the folder
"/usr/src/redhat/sources"

Last edited by John VV; 04-01-2013 at 08:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm error: can't create transaction lock NL-Stitch Linux - Newbie 5 10-19-2011 07:50 AM
Create Rpm sjacobs Linux - Software 0 11-03-2005 07:19 AM
Create a RPM of webpages. sachinnshah Linux - General 3 06-03-2004 08:40 AM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM
How can I create an RPM file mayankjohri Linux - Software 1 04-16-2002 08:13 AM


All times are GMT -5. The time now is 04:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration