google colab tar: Cannot read: Input/output error - tar

When I use !tar -xvf in Colab,there are problems:
tar: ILSVRC2012_img_train.tar: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

Related

error:02001002:system library:fopen:No such file or directory: fopen('certificate.pem','r')

I made a Go application. I'm using cobra library for run in terminal with just executable file.
I have a certificate.pem file under the root folder because I publish event to kafka.
In my IDE (goland) it worked. But when I move executable file to /usr/local/bin/ I'm getting error as followings:
error:02001002:system library:fopen:No such file or directory: fopen('certificate.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file Failed to create producer: ssl.ca.location failed: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib panic: runtime error: invalid memory address or nil pointer dereference panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xa8 pc=0x412c179]
I changed path to '../certificate.pem' and '/certificate.pem' but it does not work

running bitcoind in docker returns out of disk space error

I'm attempting to run a bitcoind container in testnet mode. I've set the prune value to 550mb in the environment variable flag (I've also tried writing it in the bitcoin.conf file)
The reason for doing this is I would like to run unit tests on a service I've written that uses RPC to communicate and send commands to a bitcoin livenet node I have in my production environment.
I don't want to download the entire blockchain and so I've tried to prune.
On booting the container, it begins to sync, however after 20-30 minutes, the bitcoin daemon tells me I've run out of disk space and the container terminates itself.
I have tried pruning docker for any unused containers and volumes. Error persists.
Error:
Error: Error: Disk space is low!
2020-07-14T13:09:52Z ERROR: ConnectBlock(): FindUndoPos failed
2020-07-14T13:09:52Z ERROR: ConnectTip: ConnectBlock 000000000022d82cb477d35be707bb013defe24ae82998bb88ad3a4884759758 failed, out of disk space (code 0)
2020-07-14T13:09:52Z ERROR: ProcessNewBlock: ActivateBestChain failed (out of disk space (code 0))
2020-07-14T13:09:52Z UpdateTip: new best=000000000022d82cb477d35be707bb013defe24ae82998bb88ad3a4884759758 height=75849 version=0x00000001 log2_work=53.328994
tx=106882 date='2010-08-23T10:34:06Z' progress=0.000195 cache=16.0MiB(85770txo)
2020-07-14T13:09:52Z UpdateTip: new best=00000000001a981f431784fd2f1b6f8b381a214c46c6fdc03c84a021f9382e08 height=75850 version=0x00000001 log2_work=53.329274
tx=106883 date='2010-08-23T10:35:34Z' progress=0.000195 cache=16.0MiB(85771txo)
2020-07-14T13:09:52Z tor: Thread interrupt
2020-07-14T13:09:52Z Shutdown: In progress...
2020-07-14T13:09:52Z torcontrol thread exit
2020-07-14T13:09:52Z addcon thread exit
2020-07-14T13:09:52Z opencon thread exit
2020-07-14T13:09:52Z msghand thread exit
2020-07-14T13:09:52Z net thread exit
2020-07-14T13:09:52Z scheduler thread interrupt
2020-07-14T13:09:52Z Dumped mempool: 6e-06s to copy, 0.052894s to dump
2020-07-14T13:09:52Z *** Disk space is low!
2020-07-14T13:09:52Z Error: Error: Disk space is low!
Error: Error: Disk space is low!
2020-07-14T13:09:52Z FlushStateToDisk: failed to flush state (out of disk space (code 0))
2020-07-14T13:09:52Z *** Disk space is low!
2020-07-14T13:09:52Z Error: Error: Disk space is low!
Error: Error: Disk space is low!
2020-07-14T13:09:52Z FlushStateToDisk: failed to flush state (out of disk space (code 0))
2020-07-14T13:09:52Z [default wallet] Releasing wallet
2020-07-14T13:09:52Z Shutdown: done
Video Explanation
https://www.loom.com/share/c71dcd805f7c4761a62eeebec1d1a406
You have two options here
Mounting a local volume in the path that you are writing the data
Increasing the docker disk image size
Docker has a default value of 10G for each container and you can increase it using this command dockerd --storage-opt dm.basesize=100G
It is not a best practice, but it will help you for now

Unable to Compile APK Release using Buildozer

I'm trying to build an apk with the buildozer -v android release command but it fails. The buildozer -v android debug runs fine and was able to pack an apk.
Here's the error
[DEBUG]:
[DEBUG]: > Task :mergeReleaseResources FAILED
[DEBUG]: Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[DEBUG]:
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':mergeReleaseResources'.
[DEBUG]: > Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[DEBUG]:
[DEBUG]: * Try:
[DEBUG]: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[DEBUG]:
[DEBUG]: * Get more help at https://help.gradle.org
[DEBUG]:
[DEBUG]: BUILD FAILED in 30s
[DEBUG]: 9 actionable tasks: 8 executed, 1 up-to-date
> Task :mergeReleaseResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 30s
9 actionable tasks: 8 executed, 1 up-to-date
STDERR:
[INFO]: STDOUT (last 20 lines of 28):
> Task :mergeReleaseResources FAILED
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 30s
9 actionable tasks: 8 executed, 1 up-to-date
[INFO]: STDERR:
[INFO]: COMMAND:
cd /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English && /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English/gradlew assembleRelease
[WARNING]: ERROR: /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build/dists/Class12English/gradlew failed!
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
Warning: failed to apply patch (exit code 1), assuming it is already applied: src/patches/SDLActivity.java.patch
# Command failed: /usr/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name Class12English --name 'English XII' --version 0.1 --package www.itutorgurgaon.com.class12english --android_api 27 --minsdk 21 --ndk-api 21 --private /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/app --presplash /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/icons/app_logo.jpg --icon /media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/icons/app_logo.jpg --orientation sensor --release --copy-libs --arch armeabi-v7a --color=always --storage-dir="/media/itutorgurgaon/1CE47CDAE47CB79A/Users/HP/AppData/Local/Programs/Python/Python37/KivyApps-ChitkaranSingh/class12english/.buildozer/android/platform/build" --ndk-api=21
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
Please Help !
I had a fiddling round with the code and the spec file. The error seemed to have been the jpg file which I used for the presplash and icon in the spec file.
I changed the jpg file to a png file. Voild ! the APK is ready.

Xcode: ipatool failed with an exception

On export .ipa file I am getting below error:
ipatool failed with an exception: #<CmdSpec::NonZeroExcitException: /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool exited with pid 45488 exit 1
Stdout:
Debug: SDK path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
Debug: PATH: ['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin', '/Applications/Xcode.app/Contents/Developer/usr/bin']
Debug: Using: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
MachoInfo: cd /
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo" "-info" "/var/folders/54/vkh5d7bx5s3cq3yb4_zshfmh0000gn/T/ipatool20180623-43023-bh0irk/thinned/armv7/Payload/test.app/Frameworks/Quickblox.framework/Quickblox"

Cocos2d v2.x, failing to install templates.. permission denied. Am I doing something stupid?

I would like to clarify this issue. I had installed Cocos2d 1.01 rc on my iMac, with XCode 4.3 installed, and I have now dowloaded v2.0 and wanted to install the templates (following the official guide). Unfortunately the terminal gives me permission denied messages on trying this operation.
I thought all I needed to do was a "sudo su" command and then a chmod and that's what I tried to do:
sudo su
chmod -R 0777 /Users/xxx/Library/Developer/Xcode/Templates/*
The result of this is which seems fine to me (read, write and execute on all subdirectories of Templates):
ls -l /Users/xxxx/Library/Developer/Xcode/Templates/
total 0
drwxrwxrwx 4 root staff 136 20 Giu 17:30 File Templates
drwxrwxrwx 19 root staff 646 15 Mar 15:14 cocos2d
But when I install the templates I get the following, which I don't quiet get.. It say "DONE!" but there are several errors in the terminal that say that was not possible to create directories because of permission (even if they all seem to have r,w,x set). Also, well I try to create an empty Cocos2d project via XCode (after rebooting XCode) the cocos2d.m still shows version v1.0.1.
For clarity here is the log from terminal after attempting to install the templates (I am a bit lost):
./install-templates.sh -f
cocos2d-iphone template installer
Installing Xcode 4 cocos2d iOS template
----------------------------------------------------
...creating destination directory: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying cocos2d files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocos2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocos2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying CocosDenshion files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshion.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshion.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying CocosDenshionExtras files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshionextras.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Kazmath files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_kazmath.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_kazmath.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
...copying template files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x" failed: Permission denied (13)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 Chipmunk iOS template
----------------------------------------------------
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Chipmunk files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_chipmunk.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_chipmunk.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 Box2d iOS template
----------------------------------------------------
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Box2d files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 CCNode file templates...
----------------------------------------------------
...creating destination directory: /Users/xxx/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/
mv: rename /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x//CCNode class.xctemplate to /Users/xxx/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/CCNode class.xctemplate: No such file or directory
done!
Any help would be appreciated :), thanks!
EDIT: Trying
sudo ./install-templates.sh -f
gives:
cocos2d-iphone template installer
Error: Do not run this script as root.
'root' is no longer supported
RECOMMENDED WAY:
./install-templates.sh -f
EDIT 2:
I tried to remove the cocos2d folders inside the Templates directory as following:
drwxrwxrwx 3 root staff 102 15 Mar 15:14 cocos2d
drwxr-xr-x 2 user staff 68 20 Giu 17:30 cocos2d v2.x
imac-di-user:File Templates user$ cd ..
imac-di-user:Templates user$ ls
File Templates cocos2d
imac-di-user:Templates user$ sudo rm -rf *
Password:
imac-di-user:Templates user$ ls
And showed no directories left. Then I went back to the folder containing the dowloaded files of Cocos2d 2.x and I lunched the install script as following:
imac-di-daniele:cocos2d-iphone-2.0-rc2 user$ ./install-templates.sh -f
Unfortunately it still fails to install them and now I am left with no templats. Here is the output from the console:
./install-templates.sh -f
cocos2d-iphone template installer
Installing Xcode 4 cocos2d iOS template
----------------------------------------------------
...creating destination directory: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying cocos2d files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocos2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocos2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying CocosDenshion files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshion.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshion.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying CocosDenshionExtras files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocosdenshionextras.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Kazmath files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_kazmath.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_kazmath.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
...copying template files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x" failed: Permission denied (13)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 Chipmunk iOS template
----------------------------------------------------
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Chipmunk files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_chipmunk.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_chipmunk.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 Box2d iOS template
----------------------------------------------------
mkdir: /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying Box2d files
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
rsync: mkdir "/Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_box2d.xctemplate/libs" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
done!
Installing Xcode 4 CCNode file templates...
----------------------------------------------------
...creating destination directory: /Users/user/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/
mkdir: /Users/user/Library/Developer/Xcode/Templates/File Templates: Permission denied
mv: rename /Users/user/Library/Developer/Xcode/Templates/cocos2d v2.x//CCNode class.xctemplate to /Users/user/Library/Developer/Xcode/Templates/File Templates/cocos2d v2.x/: No such file or directory
done!
Navigate to this folder in Finder:
/Users/xxx/Library/Developer/Xcode/Templates
Locate all folders that begin with "cocos2d". There should be two of those, one for project templates the other for file templates.
Delete these folders. You'll be asked to enter your password because it'll require superuser priviliges. Once the old folders are gone, you can install the templates.
The error occurs because you've previously installed the templates with sudo. The current templates installer script doesn't run with sudo (and fails if you try as you've already found out) and is therefore unable to remove/replace the template files previously created by the superuser. Therefore simply deleting the folders fixes the problem whereas chmod does not.
Command + Shift + G
~/Library/Developer/Xcode
remove Templates folder and recreated it
cd ....../cocos2d-iphone-2.0
./install-templates.sh –f
After several attempts, this worked for me. It is just a clarification of the answers from above, with more details. Note:I'm using a MacBook Pro, with MountainLion 10.8.2). And, I have a good working install of coco2d v1.x.
** This process will install cocos2D v2.0 and the Templates **
After you download cocos2d-iphone-2.0.tar (uncompress it and leave on desktop)
Hit Command + Shift + G (opens your directory search)
Type into search for: /Library/Developer/Xcode (to locate the cocos2d Template folder)
Remove (and backup) that "Template" folder (because the installer will not overwrite the contents)
Create a new "Template" folder in the xCode folder (so the installer will know where to write the new templates)
Open the Terminal, and type cd, then hit enter (to get a fresh line)Leave the terminal open.
Now go to and open your new cocos2d-iphone-2.0 folder, and look for the "install-templates.sh" document.
You should drag that document into the terminal on the current line and hit enter(return)
the install should begin.
start xcode > look for your new coco2s v2.x templates
Note: I did not use sudo, -u, or -f. also I don't reference cocos2d-iphone-2.0 folder in the terminal (just the install document).
1:
sudo chmod -R 777 /Users/YOU NAME/Library/Developer/Xcode/Templates
2:
./install-templates.sh -f
3:
sudo chmod -R 755 /Users/YOU NAME/Library/Developer/Xcode/Templates
Good Luck
try
sudo ./install-templates.sh -f
Do the following hacking :
Open the file install-templates.sh and comment the exit command as this :
# Make sure root is not executed
if [[ "$(id -u)" != "0" ]]; then
echo ""
echo "Error: Do not run this script as root." 1>&2
echo ""
echo "'root' is no longer supported" 1>&2
echo ""
echo "RECOMMENDED WAY:" 1>&2
echo " $0 -f" 1>&2
echo ""
#exit 1
fi
I tried it and worked with me
I guess there are some folders previously created by root and you have no privilege to change it.
try:
sudo chown -R xxx /Users/xxx/Library/Developer/Xcode/Templates
./install-templates.sh -f

Resources