Cleaning up after a failed BSD Ports Make Install Attempt? - compilation

I am trying to clean up after failed installs from ports of Emacs 21 and Emacs 23 as well as Git. I was trying to install Emacs and Git on an OpenBSD v5.2 install on a DEC VaxStation 4000 model 90. It has a staggering 32 megs of RAM and a 2.1 gig hard drive, very high end for 1991 but all this now seems puny; so yes every last megabyte of hard drive space does matter on this hard drive which is now already 72% full.
My attempts at the installs using make install within the appropriate directory of the /usr/ports tree have failed. I did run make clean after each failed compilation and have also checked /tmp and it is largely empty. OpenBSD seems to also flush /tmp with each reboot. The hard drive capacity does however seem to shrink with each failed program compilation so I am probably accumulating some programs or tarballs or cruft with each attempted installation.
The programs in question are not available as binary packages for the VAX architecture.
How do I clean up after failed ports compilations in this scenario?

Run rm -rf /usr/ports/pobj.
Check also the directory packages within /usr/ports.

Related

Gazebo stuck at loading your world

https://i.imgur.com/hYf1Bes.jpgm
I am trying to set up ROS and Gazebo in a VM running Ubuntu.
The goal is that I want to simulate Turtlebot with the open manipulator.
I installed everything without any issues.
Though I am not able to launch the Turtlebot environment on Gazebo (like here: http://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/)
$roslaunch turtlebot3_fake turtlebot3_fake.launch
results in Gazebo staying forever in the state loading your world. After some time, it stops responding.
Launching the empty world however works.
I am using ROS 1 with Gazebo 7.0
My hardware setup:
MacBook Pro 13" 2019 with 16 GB RAM
Parallels VM: 3D virtual. ON, no performance limit, 4 CPU kernels, 12 GB RAM enabled
Thank you so much for your help.
After every change you made source your bash and make sure to run :
catkin make
if you've done this already then check if ros is installed properly by running
roscore
on one terminal and let it stay running.
After that try to launch your turtlebot on another terminal.
If it doesnt work even you have installed all of the needed things, i think the problem is with your VM, id recommend you to run ROS on Ubuntu running USB Stick.
cd ~/.gazebo/
mkdir models
cd models/
wget http://file.ncnynl.com/ros/gazebo_models.txt
wget -i gazebo_models.txt
ls model.tar.g* | xargs -n1 tar xzvf
try this gazebo try to download to packages that's why it waits u need internet for that this may take few mins

Can't get Laravel Homestead to work under MacOS Catalina, random kernel panics in VM

I am a seasoned full stack web dev, a happy user of Laravel's Homestead for a couple of years, but I have been running into problems with Laravel Homestead under MacOS Catalina on my new 16" MacBook Pro for weeks now, and I just can't find out what the problem is. After issuing vagrant up, the process halts 90% of the time waiting for a successful SSH connection to the VM.
When I open up the VM's display through VirtualBox, I see different errors every time, such as:
/sbin/init: /lib/x86_64-linux-gnu/libselinux.so.1: no version information available (required by /sbin/init)
/sbin/init: /lib/x86_64-linux-gnu/libmount.so.1: version 'BLKID_2.15' not found (required by /lib/x86_64-linux-gnu/libmount.so.1)
/dev/mapper/homestead--vg-root: clean, 197904/3604480 files, 1607396/14397440 blocks
Couldn't find an alternative telinit implementation to spawn.
[ 3.535222] Kernel panic - not syncing: Attempted to kill i
/sbin/init: /lib/x86_64-linux-gnu/libidn.so.11: version 'XZ_5.0' not found (required by /lib/systemd/libsystemd-shared-237.so)
[ 3.388154] Kernel panic - not syncing: Attmpted to kill init! exitcode=0x00000100
[ 4.532862] systemd[395]: /lib/systemd/system-generators/lvm2-activation-generator failed with exit status 1
I am running Vagrant 2.2.7, VirtualBox 6.1.4 r136177 under MacOS 10.15.4. The disk image used by the VM is called ubuntu-18.04-amd64-disk001.vmdk.
My Homestead configuration came from a working set up under Mojave and has worked under Catalina, but I have no idea what changed to stop it from working. I migrated two Homestead environments: one generic one that runs all of my simple PHP websites and one project-specific one that runs a single website under Apache (this is a heavy Enterprise app that needs some specific config to work properly, so I separated it from my generic Homestead environment). This used to work fine, but now both Homestead environments give these exact same issues.
I have:
updated to 10.15.4 (but had the problem under older versions as well)
run Apple's hardware test by booting with D pressed, no issues found
reinstalled VirtualBox
removed all my virtual machines and disks
did a lot of testing under a new user account
left all the VM's settings on default
played around with the Storage's 'Host I/O Cache' settings
.. but under no conditions can I get a freshly installed Laravel Homestead machine with a fresh disk and a freshly downloaded box to come up reliably without problems. It's as if one out of ten times it does work, and the other nine out of ten I see strange errors and kernel panics (within the VM) as it is trying to come up after issuing a vagrant up. The errors above are just typical examples, I haven't even been able to reliably get the same error.
This makes me suspect something is wrong with the VM's I/O configuration, but even if I don't touch any of its default settings I run into these issues, yet I don't find other users on-line who have problems with Laravel's Homestead on MacOS Catalina or on the new 16" MacBook Pro. I am slowly going mad and have no idea where else to look.
The solution for me, at least: the problem was the Intel Power Gadget kernel extension. Uninstall it and the VirtualBox Linux client VM kernel panics should stop.
I ran into something very similar recently (Vagrant 2.2.7, VirtualBox 6.1.4 r136177 under MacOS 10.15.4 on a late 2018 i5 MacBook Air, Homestead for Laravel and Chassis for WordPress sites). Tried every older version of VirtualBox and Vagrant I could find, reinstalled macOS (though various attempts at downgrading Mojave proved unsuccessful). Lost loads of time and it was stopping me getting any development done.
Nothing at all worked, it was infuriating: every time I ran vagrant up the VMs would always kernel panic at boot, and even if I did manage to somehow connect to them post-panic with vagrant ssh they were always broken – running sudo -s; apt-get update && apt-get upgrade would fail to download packages, or fail to install, in weird ways, they wouldn't respond to network requests, etc.
So I ended up thinking: what could possibly mess things up this strangely on macOS? Kernel extensions was all I could think of. I didn't have many installed: the NTFS driver from Paragon (which I since uninstalled), Little Snitch, and – thanks to some nudging from iStat Menus saying it'd be better for power monitoring if I installed it – Intel Power Gadget (v3.7.0 for MacOS).
So, time to quickly test if my Homestead VM kernel panics on vagrant up? Yes, yes it does sighs. Right, let's unload some kernel modules and check again. Open up a terminal and run sudo -s to become root.
Now to list what we have, excluding the Apple kexts:
bash-3.2# kextstat | grep -v com.apple.
Index Refs Address Size Wired Name (Version) UUID <Linked Against>
163 0 0xffffff7f8446d000 0x4000 0x4000 com.intel.driver.EnergyDriver (3.7.0) 35E739F9-BF6C-3024-A67C-750711B3FB64 <8 6 5 3>
187 0 0xffffff7f8468b000 0x185000 0x185000 at.obdev.nke.LittleSnitch (5470) A938A4D4-0642-39B0-A99E-4FA69C7F9660 <8 6 5 3 1>
188 3 0xffffff7f84810000 0xf1000 0xf1000 org.virtualbox.kext.VBoxDrv (6.1.6) 13AC652B-A2C1-3E8E-809A-7604B284295D <8 6 5 3 1>
191 0 0xffffff7f84919000 0x8000 0x8000 org.virtualbox.kext.VBoxUSB (6.1.6) 60779F27-059F-3030-9302-A74F05246760 <190 188 64 8 6 5 3 1>
196 0 0xffffff7f8493b000 0x5000 0x5000 org.virtualbox.kext.VBoxNetFlt (6.1.6) 018767CF-8706-37EE-B97E-DEC1E0552BED <188 8 6 5 3 1>
197 0 0xffffff7f84940000 0x6000 0x6000 org.virtualbox.kext.VBoxNetAdp (6.1.6) BB0DE95D-8041-32A2-B1D1-9144E531FB07 <188 6 5 1>
So let's unload the Intel Energy Driver:
bash-3.2# kextunload -b com.intel.driver.EnergyDriver
And check that it's not listed any more:
bash-3.2# kextstat | grep -v com.apple.
Index Refs Address Size Wired Name (Version) UUID <Linked Against>
187 0 0xffffff7f8468b000 0x185000 0x185000 at.obdev.nke.LittleSnitch (5470) A938A4D4-0642-39B0-A99E-4FA69C7F9660 <8 6 5 3 1>
188 3 0xffffff7f84810000 0xf1000 0xf1000 org.virtualbox.kext.VBoxDrv (6.1.6) 13AC652B-A2C1-3E8E-809A-7604B284295D <8 6 5 3 1>
191 0 0xffffff7f84919000 0x8000 0x8000 org.virtualbox.kext.VBoxUSB (6.1.6) 60779F27-059F-3030-9302-A74F05246760 <190 188 64 8 6 5 3 1>
196 0 0xffffff7f8493b000 0x5000 0x5000 org.virtualbox.kext.VBoxNetFlt (6.1.6) 018767CF-8706-37EE-B97E-DEC1E0552BED <188 8 6 5 3 1>
197 0 0xffffff7f84940000 0x6000 0x6000 org.virtualbox.kext.VBoxNetAdp (6.1.6) BB0DE95D-8041-32A2-B1D1-9144E531FB07 <188 6 5 1>
Right, it's no longer running. Now let's try vagrant up and… wow, the VM doesn't crash any more! vagrant reload and it's still fine. Omg. All that time wasted and it was a damn kext.
I retested with all my Chassis WordPress boxes and they all started fine, too, rebooted and did the above again, and my VMs would consistently kernel panic until I unloaded the Intel Energy Driver. So I'm pretty sure it's the Intel Power Gadget that's conflicting with VirtualBox somehow and causing the VMs to kernel panic.
Can't say for sure if this is the same problem you ran into, but hopefully the above info will help anyone unfortunate enough to run into this problem and will stop you running into this issue again.

Getting chef-client 11.14.6 for later MacOSX versions

I have inherited a cheffed OSX machine running chef-client 11.14.6. I am trying to lay my hands on the installer for 11.14.6, but it seems that Chef have pulled it from the downloads site ( https://downloads.chef.io/chef-client/mac/ ).
Does anyone know anything about this, or know where I can get "archived" version?
Much appreciated.
I don't see any copies in any repos so it's probably lost to the mists of time by now. You should be able to build a new one using this commit from omnibus-chef https://github.com/chef/omnibus-chef/tree/6d5001c588edacc98f6045e22c70195200111660
Yes. From my research, and the research of others. It seems as if it has been removed.
However, we (I can't take the credit - it was one of my colleagues :) ) managed to get it working. We had another machine with the correct version on it, so we grabbed it from there and zipped it up (using root as the base, and grabbing /opt/chef).
Once tarball (e.g. opt.chef-11.14.6.tar.gz) is transferred to new machine, these were the steps used:
install chef-client v11.10.4 using:
(echo "version=11.10.4"; curl -L https://www.opscode.com/chef/install.sh) | sudo bash
verify your chef-client version is currently reported as 11.10.4 with "chef-client -v"
extract the tarball as root into the root filesystem using:
cd / && tar xvfz /tmp/opt.chef-11.14.6.tar.gz
verify your chef-client version is now reported as 11.16.4 with "chef-client -v"
run your knife bootstrap command like normal, but don't include the --bootstrap-version parameter, it'll detect chef-client is already installed and use the one you have installed manually.
I did not try rebuilding it.

Problem with GCC allocated memory on VPS

I am trying to install a python module on my VPS and am running into the following problem once I try to run the install:
virtual memory exhausted: Cannot allocate memory
error: command 'gcc' failed with exit status 1
I tried a few things that I read online to try to solve this but have yet to have any luck. I spoke with a friend at work, and he said that a common way to get around this on a VPS was to alias GCC with mySQLd since VPSs will typically allow more virtual memory for mySQL.
So, my question is: how does one alias GCC with mySQLd and then switch it back?
For reference, I am running CentOS.
I recently had the same issue while compiling PHP5 on a virtual server. The way I finally solved it was to add more swap space by creating a swap file; see http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-swap-adding.html for instructions. You may also need to raise vm.max_map_count by running /sbin/sysctl -w vm.max_map_count=[ENOUGH], where [ENOUGH] is a magic number for which I do not have a good recommendation. However, you can check it first (/sbin/sysctl vm.max_map_count) and base your guess on that.
And please congratulate your co-worker on his creativity! :)

Version control on a 2GB USB drive

For my school work, I do a lot of switching computers (from labs to my laptop to the library). I'd kind of like to put this code under some kind of version control. Of course the problem is that I can't always install additional software on the computers I use. Is there any kind of version control system that I can keep on a thumb drive? I have a 2GB drive to put this on, but I can get a bigger one if necessary.
The projects I'm doing aren't especially big FYI.
EDIT: This needs to work under windows.
EDIT II: Bazaar ended up being what I chose. It's even better if you go with TortoiseBzr.
I do this with Git. Simply, create a Git repository of your directory:
git-init
git add .
git commit -m "Done"
Insert the stick, cd to directory on it (I have a big ext2 file I mount with -o loop), and do:
git-clone --bare /path/to/my/dir
Then, I take the stick to other computer (home, etc.). I can work directly on stick, or clone once again. Go to some dir on the hard disk and:
git-clone /path/to/stick/repos
When I'm done with changes, I do 'git push' back to stick, and when I'm back at work, I 'git push' once again to move the changes from stick to work computer. Once you set this up, you can use 'git pull' to fetch the changes only (you don't need to clone anymore, just the first time) and 'git push' to push the changes the other way.
The beauty of this is that you can see all the changes with 'git log' and even keep some unrelated work in sync when it changes at both places in the meantime.
If you don't like the command line, you can use graphical tools like gitk and git-gui.
Darcs is great for this purpose.
I can't vouch for other platforms,
but on Windows it's just a single
executable file which you could keep
on the drive.
Most importantly, its interactive
command line interface is fantastic
and very quickly becomes intuitive
(I now really miss interactive
commits in any VCS which lacks them) - you
don't need to memorise many commands as
part of your normal workflow either. This
is the main reason I use it over git for
personal projects.
Setting up:
darcs init
darcs add -r *
darcs record -am "Initial commit"
Creating a repository on your lab machine:
darcs get E:\path\to\repos
Checking what you've changed:
darcs whatsnew # Show all changed hunks of code
darcs whatsnew -ls # List all modified & new files
Interactively creating a new patch from your changes:
darcs record
Interactively pushing patches to the repository on the drive:
darcs push
It's known to be slow for large projects, but I've never had any performance issues with the small to medium personal projects I've used it on.
Since there's no installation required you could even leave out the drive and just grab the darcs binary from the web - if I've forgotten my drive, I pull a copy of the repository I want to work on from the mirror I keep on my webspace, then create and email patches to myself as files:
darcs get http://example.com/repos/forum/
# Make changes and record patches
darcs send -o C:\changes.patch
You could use Portable Python and Bazaar (Bazaar is a Python app). I like to use Bazaar for my own personal projects because of its extreme simplicity. Plus, it can be portable because Python can be portable. You will just need to install it's dependencies in your Portable Python installation as well.
The best answer for you is some sort of DVCS (popular ones being Git, Mercurial, Darcs, Bazaar...). The reason is that you have a full copy of the whole repository on any machine you are using. I haven't used these systems personally, so others will be best at recommending a DVCS with a small footprint and good cross platform compatibility.
I'd use git. Git repos are really small and don't require a daemon. You can probably install cygwin or msysgit on your flashdrive.
Edit: here are some instructions for installing cygwin on a flash drive
Just to add an extra resource Subversion on a Stick. I've just set this up on my 4GB USB Drive, pretty simple and painless.
Thought I am now very tempted to try Bazaar.
Update: I've setup PortablePython on my USB drive, simple, but getting bazaar on there ...
I gave up, one dependency after another, and as I've got svn working.
If anyone knows of an easy portable installer, I'd be greatful.
I recommend Fossil http://www.fossil-scm.org/
includes
command line
dvcs
cross platform (and easy to compile)
'autosync' command make the essential task of syncing to a backup easy.
backup server configuration is a doddle.
easy to learn/use
very helpful community
web ui with wiki and bugtracker included.
3.5Mb, single executable
one sqlite database as the repository
You could put the subversion binaries on there - they're only 16ish megs, so you'll have plenty of room for some repositories too. You can use the official binaries from the command line, or point a graphical tool (like TortoiseSVN) to the repository directory. If you're feeling fancy then you could rig the drive to autorun the SVNSERVE application, making any computer into a lightweight subversion server the minute you plug in the drive.
I found some instructions for this process here.
I use subversion on my thumb drive, the official binaries will work right off the drive. The problem with this trick is you need to access a command line for this to work or be able to run batch files. Of course, I sync the files on my thumb drive to a server that I pay for. You could always host the repository on a desktop (use the file:/// protocol) if you don't want to get hosting space on the web.
I will get lynched for saying this answer, but it works under Windows: RCS.
You simply make an RCS directory in each of the directories with your code. When time comes to check things in, ci -u $FILE. (Binary files also require you to run rcs -i -kb $FILE before the first checkin.)
Inside the RCS directory are a bunch of ,v files, which are compatible with CVS, should you wish to "upgrade" to that one day (and from there to any of the other VCS systems other posters mentioned). :-)
Subversion would kinda work. See thread
Personally, I prefer to keep everything on a single machine and Remote Desktop into it.
Flash memory and version control doesn't seem like a good idea to my ears. I'm afraid that the memory will wear out pretty soon, especially if you take extensive use of various version control operations that make many small disk operations (merge, reverting to and fro, etc).
At the very least, make sure that you back up the repository as often as humanly possible, in case the drive would fail.
I'm using GIT according to Milan Babuškov's answer:
(1) create repository and commit (on office PC)
mkdir /home/yoda/project && cd /home/yoda/project
git init
git add .
git commit -m "Done"
(2) insert USB stick and make a clone of the repository
cat /proc/partitions
mount -t ext3 /dev/sdc1 /mnt/usb
git clone --bare /home/yoda/project /mnt/usb/project
(3) take the USB stick home and make a clone of repository at home
cat /proc/partitions
mount -t ext3 /dev/sdc1 /mnt/usb
git clone /mnt/usb/project /home/yoda/project
(4) push commits from home PC back to USB stick
mount -t ext3 /dev/sdc1 /mnt/usb
cd /home/yoda/project
git push
(5) take USB stick to the office and push commits from stick to office PC
mount -t ext3 /dev/sdc1 /mnt/usb
cd /mnt/usb/project
git push
(6) pull commits from office PC to USB stick
mount -t ext3 /dev/sdc1 /mnt/usb
cd /mnt/usb/project
git pull
(7) pull commits from USB stick to home PC
mount -t ext3 /dev/sdc1 /mnt/usb
cd /home/yoda/project
git pull
bitnami stack subversion it's easy to install.
You can try to install so too xampp with portableapps.com and subversion.

Resources