Unable to install Virtual Box Guest additions - virtualbox

Unable to install VirtualGuestAdditions in Linux (Tails Operating System)

Try to copy Guest ISO file(inside virtual box installation folder) to your guest.
and mount the ISO file.
Ex:
sudo mount -t iso9660 -o loop /home/tecmint/Fedora-18-i386-DVD.iso /mnt/iso/
Open the folder and run the installation scripts.
Make sure your system is compatible with virtual box guest additions.

You should download the right version, like VBoxGuestAdditions_5.0.32.iso. Here the 5.0.32 is same as your virtualbox's version.
After start your virtual system, you can select the iso to mount in the virtualbox's control menu.

I ran into same problem and worked for almost an hour, after downloading and building the iso for guest addition. This could be caused by either your dont have the optical drive, or you mount the ISO before you execute the command of [Device] [Insert]:
Make an 'empty' optical disk drive.
Run [Device] [Insert Guest Addition]
Then Ubuntu will look for c:\program files\Oracle.....(location of the Guest Addition ISO)
Remarks: look like if you pre-mount/pre-insert the ISO / virtual CD, then the error message will come out.

In each version of VirtualBox this problem is resurrected and the solution is different every time.
Now (2019, virtualbox 6.0, Ubuntu 18), for Guest Additions to work, they require the gcc compiler, Perl, make, etc. And in Ubuntu they are no longer installed by default. Then, from inside the guest, install:
sudo apt install build-essential
From Nautilus, eject the Guest Additions disk
Reboot
Menu - Devices - Insert Guest Additions disc
And that's all.

I'm going through this solution step by step:
Step 1: sudo su
Step 2: cd /media
Step 3: mkdir cdrom
Step 4: mount /dev/cdrom /media/cdrom
Step 5: cd cdrom
Step 6: sh VBoxLinux-Additions.run
Just be patient as it takes some time and remember you are root
In case it didn't work please follow this link from SuperUser, hope it helps you.

Related

macOS Catalina: trying to install content to the system volume

I have apps that I distribute as .pkg files created using pkgbuild and productbuild. With macOS Catalina, this doesn't work any more. The installer complains that I'm trying to install content to the system volume.
I posted three weeks ago thinking the error had to do with bundling a Java runtime. It turns out it has nothing to do with Java.
To test it I have the smallest possible project called Hello with a main window and a button to click. In XCode, I do Product -> Archive, then Distribute App, and Copy App. This creates a directory Hello 2019-12-18 15-01-07 with contents Hello.app. The app works fine. I then
pkgbuild --root *7 Hello.pkg
which creates Hello.pkg.
When I double-click Hello.pkg in the finder the installer presents me with screens for Introduction, Destination Select (only one option is offered), and Installation type ("Standard Install on Macintosh HD"), then asks me for my password. It then says, "This package is incompatible with this version of macOS. The package is trying to install content to the system volume. Contact the software manufacturer for assistance."
It makes no difference if I codesign and notarize. Productbuild only adds one more layer to the failing process.
What am I missing?
We could fix the issue by using the option
--install-location
of the pkgbuild command.
If the
--install-location
option is not used, pkgbuild uses / as the default install location in many cases.
In macOS Catalina, only certain folders are writable. Refer this link for more details.
In our case, the package installation succeeded only when we specified one of the writable folders such as
/usr/local
/opt
/Applications
as the default install location.

How to install C++ 14.0 Offline and make python aware of it?

I am trying to figure out how to install c++ 14.0 offline using suggestions from other Stackoverflow Q&A. But none of them seem to work. I need it for Cython. I don't want to install the binary version. I installed suggested redistributables and then restarted the server for paths to be applied properly but when I pip install cython.tar it still does not find the c++ 14.0 dependency. Any help would be greatly appreciated.
The following are links to what I have installed based on other Stackoverflow answers:
Microsoft Build Tools 2015: https://www.microsoft.com/en-za/download/details.aspx?id=48159
Windows 10 SDK ISO: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Then I restarted the windows server and I even ran the following command suggested by some other answers:
python -m pip install setuptools --upgrade
After months of researching and trying all sorts of methods the following has worked:
Step 1: Download the build_tools.exe of your choice
Step 2: Make sure you are on a machine with the exact same environment you are going to install the c++ dependencies on. i.e. If server is windows server 2016 64bit run a vm to emulate that exact environment.
Step 3: Goto this site to get a list of all possible components you can download in the next step - https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2019
Step 4: Follow the following instructions to get a local cache download of your choice -
https://learn.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019
Step 5: copy everything to the server and continue following the instructions from step 4
Step 6: restart the machine to apply paths properly
Step 7: copy rc.exe and rcdll.dll from C:\Program Files (x86)\Windows Kits\8.0\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
Step 8: Download the latest setuptools from pypi.org
Step 9: run the following command with admin rights python -m pip install path/to/setuptools.tar --upgrade
Step 10: Restart machine again to apply paths.
Once all steps are followed c++ 14.0 (or of your choice) will be installed properly and linked with no issues.
Install chocolatey, then use their script to install Visual Studio 2019 build tools, better use following command:
choco install visualstudio2019buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US"
After that you will see Visual Studio GUI installer where you can manually select packages needed (be aware of size)
Source: https://chocolatey.org/packages/visualstudio2019buildtools
According to this site, "Another option is to use Microsoft’s Visual C. One must then use the same version which the installed Python was compiled with." It's likely you're not on a matching version. Cython itself recommends MinGW, which is easy enough to install following the directions on their site. Just make sure the compiler and standard library are in your Windows PATH. I believe they have to be added manually, which is pretty easy in Windows 10.
download visualcppbuildtools_full.exe file and execute.
unselect all the checkboxes.
install button will be shown, click it.
restart pc and it's done.

Visual Studio 2017 Linux remote debugging (gdbserver)

After I installed gdbserver on my remote machine (Ubuntu 16.04.4 LTS), I tested the following c++ code by making a "cross-platform console application (linux)" project in Visual Studio 2017:
#include <cstdio>
int main()
{
printf("hello from testLinuxDebug!\n");
return 0;
}
I added the connection information (ip address, id, password) of my Ubuntu machine to connection manager and selected "gdbserver" for debugging mode.
Then I started debugging and got the following message:
Unable to start debugging. Unexpected GDB output from command
"-interpreter-exec console "target remote localhost63361"". Remote
connection closed.
Message after starting to debugging (Image captured from VS2017)
By the way, I got the following message from the Linux Console Window of debug menu of Visual Studio 2017:
Process /home/.../projects/testLinuxDebug/bin/x64/Debug/testLinuxDebug.out
created; pid = 29277 Listening on port 4444 Remote debugging from host
127.0.0.1 /build/gdb-9un5Xp/gdb-7.11.1/gdb/gdbserver/regcache.c:264: A problem > internal to GDBserver has been detected. Unknown register ymm0h requested
Message from Linux Console Window (Image captured from VS2017)
Could anybody help me with this problem?
I was having this exact same problem on my Ubuntu 16.04 machine.
I went through the source code on gdbserver, and it appears to be a problem with a processor register (ymm0h) which is only available to i386 processors.
The thing is, I don't know how to fix gdbserver to not use this register in particular, but you can solve the error by upgrading your gdb & gdbserver to version 8.3 on the Ubuntu machine. If my guess is correct, version 8.1 was the one that fixed this issue, but by default, Ubuntu 16.04 has version 7.11.1 for both gdb & gdbserver.
You can run these commands on the linux machine to do that:
wget "http://ftp.gnu.org/gnu/gdb/gdb-8.3.tar.gz"
tar xzf gdb-8.3.tar.gz
cd gdb-8.3
./configure --prefix=/usr --with-system-readline
make
sudo make install
You may need to install some extra packages in order to compile the gdb:
sudo apt-get install libreadline6-dev texinfo
If you still have problems trying to install gdb, try this example from Linux from Scratch.
Good luck!
I encountered the same problem as you, although for me the issue was on Microsoft's Visual Studio Online platform - I couldn't use pwntools' gdb.debug/gdb.attach functionality (that relies on gdbserver) due to this very same error in VSOnline's docker environment.
Leaving this answer here for people who might encounter the same issues that I have.
The issue and the steps are pretty similar to what Canella described - the root of the problem is indeed the old GDB version in the environment (7.12 at the time of writing).
I've compiled my GDB with python3 bindings, and you might want to do that too if you're planning to use GEF or similar GDB extensions.
Here's how to do that in your VSOnline environment's terminal:
# I needed to get rid of the apt-provided gdb for it to work properly
sudo apt remove gdb
# VSOnline has a weird way of handling python versions
# you're better off installing python3 from apt, if it's not installed yet
sudo apt update
sudo apt install libreadline6-dev texinfo python3 python3-dev
wget "http://ftp.gnu.org/gnu/gdb/gdb-8.3.tar.gz"
tar xzf gdb-8.3.tar.gz
cd gdb-8.3
mkdir build && cd build
../configure --prefix=/usr --with-system-readline --with-python=/usr/bin/python3
make
sudo make install

VirtualBox extension pack error

I purchased a network card to give a separate network to my virtual machine. My host OS is Ubuntu 14.04 . Also i need to mount the USB to my virtual machine and not my host OS, so i downloaded extension pack version 5.0.2 for Vbox-5.0 . While installing virtual box extension pack, there were two VM's running and i got this popup.
Failed to install the Extension Pack /home/aniket/Downloads/Oracle_VM_VirtualBox_Extension_Pack-5.0.20-106931.vbox-extpack.
Failed to load the main module ('/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/linux.amd64/VBoxPuelMain.so'): VERR_FILE_NOT_FOUND - /usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/linux.amd64/VBoxPuelMain.so: undefined symbol: RTLogRelGetDefaultInstanceEx.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ExtPackManager
Interface: IExtPackManager {3295e6ce-b051-47b2-9514-2c588bfe7554}
Even after power off of VM's and restarting the host OS, I get this similar error code.
Sorry if you think the question is not formatted properly or any other issue with my question. This is my second post, please tell me if there are any things i need to correct in my question.
Thanks in Advance.
After lot of test and trial, the solution I found that the extension pack was not compatible and hence I had to download the compatible version of the virtualbox I am running on.
What happened was this, I was running virtualbox-5.0 and the version I was trying to install was 5.0.20 .
You can check your version by clicking on Help and then About Virtualbox and download the exact compatible extension pack, else it will through the same hex error code 0x80004005 which means file not found.
Run vboxmanage command with sudo, i.e.:
sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.1.22-115126.vbox-extpack --replace
From:
https://www.virtualbox.org/ticket/17034
I uninstalled virtualbox,then reinstall it. After this the extension pack got installed successfully. My version is `5.1.12 r112440 (Qt5.6.2)
I encounter this problem again, but this time I disable my antivirus software(mcafee), that is ok. refer by https://www.virtualbox.org/ticket/7972

How to build and install Valgrind on Mac?

I am on Mac OS X using codeblocks 10.05
I downloaded Valgrind, and extracted a folder. I am completely lost from there, and have no idea how to build it.
I do not know ANY terminal/console commands and am generally new to programming, so I have no idea how to "build" or "compile" it. I just have a folder called Valgrind with a bunch of random files in it.
Could someone please tell me how to proceed? I already checked the website/documentation but it didn't really give me installation instructions, just usage instructions.
Thanks
PS: I know I already posted this question, but the previous question was shut down, for being too vague. I reposted this one with more info.
PSS: All that I am basically asking is what do I do to install Valgrind right after I download it from the website and extract the files?
Recommended:
Use brew: brew install valgrind
Manual Install:
Here's what worked on my Mac (10.6). Double-check you have the latest version, then change into the uncompressed directory
cd /users/(insert username here)/downloads/valgrind-3.17.0
I suggest you do as another posted and read the readme.
nano README
Commence the build; /usr/local is the place on the filesystem that the program will be installed to. There are many arguments like prefix that are available to customize the installation to your particular system if it doesn't work by default. Normally just using ./configure works perfectly well though.
./configure --prefix=/usr/local
make
sudo make install
Or you could probably get it from fink or macports or homebrew.
You can install it through brew for Mac:
brew install valgrind
You might have to manually link the entry to /usr/local/bin as brew refused to do it in my case:
$ ln /usr/local/Cellar/valgrind/3.8.1/bin/vgdb /usr/local/bin/vgdb
ln: /usr/local/bin/vgdb: Permission denied
$ sudo ln /usr/local/Cellar/valgrind/3.8.1/bin/vgdb /usr/local/bin/vgdb
On MacOS High Sierra
If you have the following error message:
brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than Sierra due to an upstream incompatibility.
Fix
(1) To correctly install it, first, type the following command at the Terminal (which opens Valgrind’s formulae)
brew edit valgrind
And change the URL in head section
https://sourceware.org/git/valgrind.git
to
git://sourceware.org/git/valgrind.git
(2) Do an update for Homebrew:
brew update
(3) Finally, use the following command to install Valgrind from the HEAD:
brew install --HEAD valgrind
Sources
https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/
https://github.com/Homebrew/homebrew-core/issues/18998
For macOS Big Sur / Monterey:
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
The core process is pretty simple:
Make sure you are in the correct directory.
First run:
./configure
when that is finished, run:
make
at this point you will need to su into root (this is relatively tricky to do, see the note at the end). As root, run:
make install
When this is finished you will have a working valgrind installation. Test it by running
valgrind ls -l
To su into root, you will need to have set up a root account. If you have not done this in the past, see the instructions from apple here.
To perform the actual su, you will first have to be running an account with administrator privileges. If you are not already doing so, you can switch users with the following:
su admin
where admin is the name of an user with administrator privileges (you will need to enter the password for this account). From there, you can then run su to go into root:
su
You will need to enter the root password that you set up earlier.
You may find it easier to use something like macports. How to install that is probably beyond the scope of this question, but they have a page dedicated to it on their site.
Once you have macports installed, you need to type:
sudo port install valgrind +universal
As you say you don't have any experience of command lines, let's just briefly go through the different parts of this command:
sudo means the rest of the command will run as root, and will ask for your password. This is needed for the installer to have the correct permissions
port is the command line tool for managing macports
install is a command for port. Try port help to see a list of commands.
valgrind tells macports what it should be installing
+universal is a variant. This tells macports to configure valgrind to support 32 bit and 64 bit support.