Is it possible to "apt install" in SageMaker Studio Lab? - amazon-sagemaker

I have started using SageMaker Studio Lab.
When I run "apt install xvfb" in SageMaker Studio Lab Notebook, I get the following error.
!apt install xvfb
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Then I tried with sudo, but the sudo command was not installed.
!sudo apt install xvfb
/usr/bin/sh: 1: sudo: not found
Can you please tell me how to solve this problem?

To date Studio Lab doesn't support package installs that require root access. It does support packages installable via pip and conda. You can do that either in your notebook with the %, rather than the !, or you can do that via opening a terminal.
https://docs.aws.amazon.com/sagemaker/latest/dg/studio-lab-use-manage.html
If you'd like to open an issue you're welcome to do that on our repository right here:
https://github.com/aws/studio-lab-examples/blob/main/.github/ISSUE_TEMPLATE/bug-report-for-sagemaker-studio-lab.md
Thanks for trying out Studio Lab!

Related

Nothing provides python needed by mssql-server-is

I'm trying to install SQL Server Integration Services on RHEL 8. I have SQL Server 2019 (version v15) installed and running successfully, but when I try and follow this:
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ssis?view=sql-server-ver15#RHEL
The RHEL 8 repo doesn't have the mssql-server-is package in it, and using the RHEL 7 repo throws this error:
Error: Problem: conflicting requests
- nothing provides python needed by mssql-server-is-15.0.2000.5-4.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I have both Python2 and Python 3 installed, and when I run this:
alternatives --config python
I see that /usr/bin/python2 is selected
Any ideas how I can get SSIS installed for RHEL 8 and SQL Server 2019?
I could install it by downloading the rpm and then installing it using --nodeps option as below:
sudo yum download mssql-server-is
sudo rpm -Uvh --nodeps mssql-server-is*rpm
Worked pretty smooth for me.

Install Microsoft ODBC Driver for SQL Server on Ubuntu 18.04

The goal is to install Microsoft Driver for SQL Server on Ubuntu 18.04 to write scripts using python package pyodbc.
I make steps according this article. The problem is when I run command sudo ACCEPT_EULA=Y apt-get install msodbcsql17 then I recieve next error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
msodbcsql17 : Depends: unixodbc (>= 2.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
Only relevant discussion of this problem is here. But I have already tried all recomendations:
Remove all relevant packages
Use clean system
Build unixodbc manually
Nothing helped me. Does anyone met same problem or have guide how to install this driver on clean Ubuntu 18.04 server system?

/usr/bin/mingw32-cmake: line 84: fg: no job control (Midori cross-compiling error)

I'm trying to compile Midori Web Browser for Windows on Fedora 22. For that purpose I'm following this tutorial.
I installed these dependencies except faenza-icon-theme:
yum install gcc vala intltool
yum install libsoup-devel webkitgtk3-devel sqlite-devel
yum install mingw{32,64}-webkitgtk3 mingw{32,64}-glib-networking mingw{32,64}-gdb mingw{32,64}-gstreamer-plugins-good
yum install faenza-icon-theme p7zip mingw32-nsis greybird-gtk3-theme
Later I installed faenzai-icon-theme via using a third party rpm.
I downloaded source:
bzr branch lp:midori
cd midori
mkdir _mingw32
cd _mingw32
But at this step:
mingw32-cmake .. -DUSE_ZEITGEIST=0 -DUSE_GTK3=1 -DCMAKE_INSTALL_PREFIX=/usr/i686-w64-mingw32/sys-root/mingw -DCMAKE_VERBOSE_MAKEFILE=0
I'm getting an error:
/usr/bin/mingw32-cmake: line 84: fg: no job control
I don't know how to solve this problem and the meaning of this error. I made a research on internet but nothing came up.
FWIW: I had the same error message trying to build a project of mine. It went away after
yum install cmake
Both mingw32-cmake and mingw64-cmake need cmake to function. (Actually, make that dnf install cmake nowadays.)

rethinkdb index-rebuild complains python driver is missing

Ran into this error when trying to run rethinkdb rebuild command:
Error when launching 'rethinkdb-index-rebuild': No such file or
directory The rethinkdb-index-rebuild command depends on the RethinkDB
Python driver, which must be installed. If the Python driver is
already installed, make sure that the PATH environment variable
includes the location of the backup scripts, and that the current user
has permission to access and run the scripts.
Yet I have the rethinkdb python module installed and path setup properly:
Requirement already satisfied (use --upgrade to upgrade): rethinkdb in
/Library/Python/2.7/site-packages Cleaning up...
Why doesn't this work?
If the rethinkdb-index-rebuild script is not in your PATH, you might be able to invoke the index-rebuild command as
python -mrethinkdb._index_rebuild
Turns out it was a feature implemented in a newer version of the python module. Solved it by:
sudo pip install --upgrade rethinkdb

Cannot install YUM in MacOS

I'm trying to run the build script from HTML5 Boilerplate and I have to install YUM for that. I am on Mac OS Snow Leopard 10.6.8. When I did sudo port install yum, i'm getting the following error. Any idea how can I rectify it and install yum properly?
---> Computing dependencies for py24-nose
---> Dependencies to be installed: py24-distribute
---> Activating py24-distribute #0.6.24_0 Error: Target org.macports.activate returned: Image error:
/opt/local/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg-info
already exists and does not belong to a registered port. Unable to
activate port py24-distribute. Use 'port -f activate py24-distribute'
to force the activation. Error: Failed to install py24-distribute Log
for py24-distribute is at:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-distribute/py24-distribute/main.log
Error: The following dependencies were not installed: py24-distribute
Error: Unable to upgrade port: 1 Error: Unable to execute port:
upgrade py24-nose failed To report a bug, see
<http://guide.macports.org/#project.tickets>
Previously after installing YUM, i was getting Segmentation Fault, so I uninstalled and installed it again using Macports to get the above error.
I think you've got the wrong end of the stick here. You do not need to install YUM on the Mac. In fact, that act is sheer madness, because you already have a perfectly good package manager in the shape of MacPorts!
Read again what it says
If you're on Mac or Linux...
You've got all your dependencies pre-installed, likely. You may need a yum install ant-contrib or what have you.
The key bit there is "or what have you". That is a cryptic way of saying "or the equivalent command for your package manager". On Red Hat-based systems, the package manager is indeed YUM; on Debian systems, it's APT; on the Mac, it's MacPorts.
So, remove your YUM installation, and simply do:
port install ant-contrib
You can now proceed to actually running Ant.

Resources