Can't create directory while in fakeroot

Hi all,
I'm trying to create a PKGBUILD for mplabx. When the installer tries to create the directory /opt/microchip, it gets the error permission denied.
My pkgbuild:
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Cedric de Wijs <[email protected]>
pkgname=microchip_mplab-x
pkgver=7.02
pkgrel=1
epoch=
pkgdesc=""
arch=('x86_64')
url="http://www.microchip.com/en_US/family/mplabx/index.html"
license=('unknown')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(http://ww1.microchip.com/downloads/mplab/X_Beta/mplabx-ide-beta7.02-linux-64-bit-installer.bin)
noextract=()
md5sums=('fbe573dabb54120947bbefaa2d8003d4')
build() {
whoami
check() {
whoami
package() {
whoami
chmod +x mplabx-ide-beta7.02-linux-64-bit-installer.bin
mkdir -p /opt
mkdir /opt/microchip
mkdir /opt/microchip/mplabx
./mplabx-ide-beta7.02-linux-64-bit-installer.bin
The console output:
$ makepkg
==> Making package: microchip_mplab-x 7.02-1 (Mon Sep 26 07:42:15 CEST 2011)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found mplabx-ide-beta7.02-linux-64-bit-installer.bin
==> Validating source files with md5sums...
mplabx-ide-beta7.02-linux-64-bit-installer.bin ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Starting build()...
cedric
==> Starting check()...
cedric
==> Entering fakeroot environment...
==> Starting package()...
root
mkdir: cannot create directory `/opt/microchip': Permission denied
==> ERROR: A failure occurred in package().
Aborting...
When I create the directory /opt/microchip (in the real root), the above error changes:
$ su
Password:
[root@cedric mplab-test]# mkdir /opt/microchip
[root@cedric mplab-test]# exit
exit
[cedric@cedric mplab-test]$ makepkg
==> Making package: microchip_mplab-x 7.02-1 (Mon Sep 26 07:45:15 CEST 2011)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found mplabx-ide-beta7.02-linux-64-bit-installer.bin
==> Validating source files with md5sums...
mplabx-ide-beta7.02-linux-64-bit-installer.bin ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Starting build()...
cedric
==> Starting check()...
cedric
==> Entering fakeroot environment...
==> Starting package()...
root
mkdir: cannot create directory `/opt/microchip': File exists
==> ERROR: A failure occurred in package().
Aborting...
What can I do to get around this?
Best regards,
Cedric

Thanks. I have now adjusted the PKGBUILD as such
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Cedric de Wijs <[email protected]>
pkgname=microchip_mplab-x
pkgver=7.02
pkgrel=1
epoch=
pkgdesc=""
arch=('x86_64')
url="http://www.microchip.com/en_US/family/mplabx/index.html"
license=('unknown')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(http://ww1.microchip.com/downloads/mplab/X_Beta/mplabx-ide-beta7.02-linux-64-bit-installer.bin)
noextract=()
md5sums=('fbe573dabb54120947bbefaa2d8003d4')
build() {
whoami
check() {
whoami
package() {
whoami
chmod +x mplabx-ide-beta7.02-linux-64-bit-installer.bin
install -d "$pkgdir"/opt/microchip/mplabx
./mplabx-ide-beta7.02-linux-64-bit-installer.bin
The directories are no made without problems, but the mplab installer still complains it can't create the directories.
$ makepkg
==> Making package: microchip_mplab-x 7.02-1 (Mon Sep 26 08:04:04 CEST 2011)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found mplabx-ide-beta7.02-linux-64-bit-installer.bin
==> Validating source files with md5sums...
mplabx-ide-beta7.02-linux-64-bit-installer.bin ... Passed
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Starting build()...
cedric
==> Starting check()...
cedric
==> Entering fakeroot environment...
==> Starting package()...
root
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded: ignored.
==> ERROR: A failure occurred in package().
Aborting...
It looks like makepkg only runs install in the fakeroot. Is there any way a binary installer can be run inside the fakeroot?
Am I going in the right direction, or is there no way to run a binary installer like this?
Are there other binary installers that are run like this?
Best regards,
Cedric
Last edited by cdwijs (2011-09-26 06:32:06)

Similar Messages

  • Can not create directory error while creating database

    i am creating database using dbca in oel but when i try to do so i get an error saying can not create directory pawii
    and pawii is the sid
    actually oracle is installed on u01 and i am creating database in u02
    but this error is not allowing me to create database but when i try to create database in uo1 the database installed successfully but this is not happening when i try to create database in another mount point u02

    987018 wrote:
    so finally i had solved the problem myself as people like rukbat are very unhelpful in nature here
    all we had to do is we had to change the group of the folder to oracle and oinstall where we are going to create our new database :)Actually he tries to be quite helpful. But sometimes the help you need isn't the help you want.
    "When you need me but do not want me, then I must stay. When you want me but no longer need me, then I have to go." (Nanny McPhee)

  • Can't create directory c:\Program Data\Apple Computer\iTunes

    While installing iTunes, get message "can't create directory c:\Program Data\Apple Computer\iTunes.  After that, it uninstalls itunes and I'm back to square one.  What can I do or what could be causing this?

    First I think you'll find it is ProgramData without a space. Check for an existing iTunes folder at that location and rename it to Not iTunes. Try again.
    tt2

  • Fetch error message: Can't create directory

    Hi again--Help!!
    I have my whole site fixed of "errant" characters and ??? and it is ready to upload to a GoDaddy host.. And after turning off "Translate ISO characters" in the Fetch preferences, I now get this message:
    "Server response: Can't create directory: File exists."
    Woe is me, what can be done? Can be so kind as to help me again?? Thanks so much...

    Just a note to say that I figured out the problem myself. It was a "space" in front of the named web pages in the iWeb list. You have to make sure there are no spaces like that or it will not publish properly! Everything is up and running now...Whew.

  • Time Machine Error--Can't create directory

    I'm not a happy Time Machine user right now. Maybe someone can help me. Bought a 1 TB hard drive for backup of laptop internal hard drive and two external hard drives. Worked okay originally, but seems to cause some slow application loads and file transfers. Today started to get error message (this is not verbatim) "Can't run Time Machine because of directory problem." Great! What do I do now?
    Thanks
    P.S. I wish Time Machine had an archive ability to external medium such as data DVDs. Anyone else agree? Are there work-arounds? Maybe I uninstalled Intego's Personal Backup too soon?

    Welcome to Discussions.
    It sounds like you might have a disk problem with either your internal disk or the Time Machine disk. Launch Disk Utilities which is on the dock or, if you removed it, in the Applications > Utilities folder. Click on your Time Machine disk in the left pane and then click on the Repair Disk button. If any errors are found repeat Repair until Disk Utility gives the disk a clean bill of health.
    Then click on your internal disk and click on Verify Disk. The Repair button will be grayed out because you can't repair a disk you are booted from. If any errors show up you will need to shut down and boot from the Leopard install DVD. Insert the Leopard install DVD, turn the computer on and hold down on the "c" key until you see the spinning gear. It will take awhile. Choose a language and select Disk from the Utilities menu at the top of the screen. Repair your internal disk and repeat until there are no errors.
    Discussions is a user-to-user forum. If you would like for Time Machine to support archiving to CD/DVD or have any other suggestions for future features post them to Feedback as it is unlikely that anyone from Apple will read your post in Discussions but they do read Feedback.
    http://www.apple.com/macosx/feedback/

  • When starting Lightroom 5.6 for the first time I get the error message "AgPathUtils.getStandardFilePath: can't create directory at: /Users/.../Pictures" when trying to import pictures

    Today I installed Lightroom 5.6 on Mac OS 10.9.4. Photoshop Elements 11 is also installed on this computer. This Lightroom Version is the 30 day test version. My Picture folder is linked to a secondary hdd, but this worked fine with any other program so far. This error keeps me from editing / opening pictures. Any help is appreciated.

    I replaced the symlink with a folder named "Pictures" and it actually worked. At least a new menu shows up. BTW Photoshop Elements does not complain.

  • Cannot import photos.. "can't create directory where file exists"

    Hi,
    I am unable to import photos into Lightroom... every time I try to a message pops up that reads
    I have no idea what this means or how to solve this issue. Lightroom is housed on my external hard drive... Recently, my old external HD conked out and I had to ship it off to the tech wizards who successfully removed and placed the data on a new HD. The problem importing started to occur after I began using the new external HD.
    Please help! Thanks in advance

    This could be a permissions issue. Check to see that you have write permissions for that destination folder. Don't just check your general permissions, check for that specific folder.

  • Creating directory

    How can I create directory(folder) in the file system with pl/sql. I know you can create file or write in to a file, in any folder in file system with utl_file. but what about creating a folder then a file in to it.

    depending on your os/oracle version, you can use dbms_scheduler to do that.
    ex in AIX5L/10.2.0.2
    $ cat /tmp/x            
    #!/bin/ksh
    mkdir /tmp/xxx
    SQL> exec dbms_scheduler.create_job(job_name=>'createdir',job_type=>'EXECUTABLE',job_action=>'/tmp/x',start_date=>sysdate,enabled=>true)                                       
    PL/SQL procedure successfully completed.or you can use java

  • Create directory on a two-node Oracle server cluster

    Hi,
    How can I create directory on a two-node Oracle server cluster (2 identical servers running the same Oracle database instances with shared disks)? Both of them run Windows 2008.
    I know this works for Oracle running in a single server. How about in failover cluster environment?
    CREATE OR REPLACE DIRECTORY g_vid_lib AS 'X:\video\library\g_rated';
    Thanks.
    Andy

    Using 11.2.0.? Using ASM? use ACFS - it is a SHARED file system.
    http://docs.oracle.com/cd/E16338_01/server.112/e10500/asmfilesystem.htm
    create [big empty disk group]
    create ACFS volume {container file that lives in that diskgroup]
    create ACFS file system
    mount the file system.
    Now, all nodes in the cluster can access that shared device at the OS level just as if it were any other device.

  • Can not delete directory structure

    Hello,
    i have tryed very much but no luch. i want to delete directory structory. directory may contain n no of files and n no of sub directories.
    Please help me to correct this code. please give me solution it is very nessary in my project.
    Veru much thans in advance
    My code
    private boolean deleteDomainStructure(File dir){
              if (dir.isDirectory()) {
         String[] children = dir.list();
         for (int i=0; i<children.length; i++) {
              boolean success = deleteDomainStructure(new File(dir, children));
         if (!success) {
         return true;
         return dir.delete();

    Oh,
    Okey, would you tell me how can i create directory with read only property off.
    when i create a dir with File f = new File(path); file.mkdir(); it create a dir with read only.

  • I just bought a new Ipad mini a while ago, a created a new apple ID "***************" , I can't download anything on apps store, it keeps on asking for a credit card but I don't have one. Can I create an account without a credit card?

    I just bought a new Ipad mini a while ago, and created a new apple ID *********** , I can't download anything on apps store, it keeps on asking for a credit card but I don't have one. Can I create an account without a credit card?
    <Edited by Host>

    Read this:
    iTunes Store: Accepted forms of payment
    It is the same for the app store. You are required to have some sort of payment method in the record.
    Barry

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How can I create a custom feature, which will automatically take a custom master page while creating a site ?

    Hello ,
    I am new in Sharepoint development . I am trying to create a Sharepoint feature to Activate master page automatically while creating the site .Below mentioned code I am using to do this . 
    But When I am creating any site under site collection .It is not applying automatically . I have to manually Activate that feature . 
    SPSite site = properties.Feature.Parent as SPSite;
    SPWeb rootWeb = site.RootWeb;
    Uri masterUri = new Uri(rootWeb.Url + "/_catalogs/masterpage/mycustom.master");
    rootWeb.MasterUrl = masterUri.AbsolutePath;
    rootWeb.CustomMasterUrl = masterUri.AbsolutePath;
    rootWeb.Update();
    How Can I create a feature that can activate the master page at same time of site creation under Site collection ,Without any manual work .. 
    Thanks in Advance .. 

    Hi,
    You can associate master page during feature activation as follows:
    http://social.technet.microsoft.com/wiki/contents/articles/19933.sharepoint-2010-set-a-custom-master-page-during-feature-activation.aspx
    Then, you can use feature stapling to apply automatically on site creation:
    http://blogs.msdn.com/b/kunal_mukherjee/archive/2011/01/11/feature-stapling-in-sharepoint-2010.aspx
    Thanks,
    Avni Bhatt

  • I can't create a new tag while saving a file in Yosemite.

    The title pretty much says it all :-) As I try to type in a new tag while saving a file, the curser just blinks, and doesn't respond.  I can't create a new tag. I can click on existing tags, and they get added to the file, but the support page on tags says:
    To add a tag:
    Click on a recent tag that appears in the menu to link it your document. You can even add multiple tags.
    Click “Show All…” to see the all of the tags you have created. Then, click on a tag to add it.
    You can also add tag by typing. As you type in the Tags field, you’ll see matching suggestions from your existing tags.
    To add a new tag, just type it in the field.
    New tags you create automatically appear in other locations where tags are visible, such as in the Finder sidebar.
    The fourth bullet is the one I'm referring to. I think this might be a bug, but I can't find a way to report it. If it's not a bug, I would really appreciate some guidance.
    Here's some system info:
    MacBook Pro (15-inch, Early 2011)
    Model Identifier: MacBookPro8,2
    Processor Name: Intel Core i7
    Processor Speed: 2.2 GHz
    Number of Processors: 1
    Total Number of Cores: 4
    L2 Cache (per Core): 256 KB
    L3 Cache: 6 MB
    Memory: 8 GB
    Boot ROM Version: MBP81.0047.B27
    SMC Version (system): 1.69f4
    Yosemite version:10.10 (14A389)
    Thank you very sincerely for your time,
    Chris

    What sort of file(s) are you trying to tag while saving?
    Have you tried saving the file first, then tagging it/them afterwards?

  • Geting error while creating a dir through CREATE DIRECTORY command

    Hi Gurus,
    When I'm trying to create a dir through this command with logged in as SYS
    CREATE DIRECTORY pump_dir AS 'd:\temp\pump_dir';
    I'm getting the error
    Error starting at line 1 in command:
    CREATE DIRECTORY pump_dir AS 'd:\temp\pump_dir'
    Error at Command Line:1 Column:18
    Error report:
    SQL Error: ORA-00955: name is already used by an existing object
    00955. 00000 - "name is already used by an existing object"
    Any ideas how I can create a dir and grant access to a different user.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    I checked and there is no such directory. I guess it is not that simple, the error I mean.Actually it is , please see,
    ORA-00955:     name is already used by an existing object
    Cause:     An attempt was made to create a database object (such as a table, view, cluster, index, or synonym) that already exists. A user's database objects must have distinct names.
    Action:     Enter a unique name for the database object or modify or drop the existing object so it can be reusedSo as Sb mentioned, check that which object is using the same name that you are trying to assign to this directory object and either rename or drop the object if you want to use the same name only. If not, you can always use another distinct name for this directory object .
    Aman....

Maybe you are looking for

  • Safari crashes when trying to enter in password field

    Hi Apple Community! My Safari crashes when trying to enter the password to a certain online forum. This is not happening to Google Chrome. I have tried disabling extensions and third-party plugins but it doesn't seem to work. See below for the error

  • Imovie app doesn't export full screen?!!?!?!?!?!?!?!

    when ever i make a vid in imovie and export it it comes out tiny? this is my video show you http://www.youtube.com/watch?v=JqgoBHs7rXU its really f*ing annoying

  • Fast Change function to change plants in sales order

    Hi All, Once the plant is determined in sales order, thru the option "edit fast change-->plants", one can change the plants at line item level. my issue is Iam using a BOM material in sales order. In the line item, the main material has plant 3019 an

  • Captioning in video

    hi pls see this url http://www.kingtut.org/flash/video/tut_cc.html this sample is developing in Flash cs4. but i want to do this sample using Flash Builder 4. how can i do this? pls give any ideas regards athi

  • Help - Recording audio interviews for use as podcasts

    Hi there - I'm looking for guidance on getting started with recording audio interviews and then putting on the net as a podcast. Key questions are: - What is the best equipment to use when starting, in terms of microphones etc.? etc.(The interviews w